This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  25e01e5cc71e0ab023357e729aabf744c61415a1 (commit)
       via  3e802584fe5031a2de666b8ced1db45003648adc (commit)
      from  39840769408e690bb48ae2efa412565b9b8e046b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=25e01e5cc71e0ab023357e729aabf744c61415a1

commit 25e01e5cc71e0ab023357e729aabf744c61415a1
Author: Franck Villaume <[email protected]>
Date:   Fri Jul 15 12:36:46 2016 +0200

    docman: add support for comment per version

diff --git a/src/common/docman/Document.class.php 
b/src/common/docman/Document.class.php
index 38f6a7b..cf2cddc 100644
--- a/src/common/docman/Document.class.php
+++ b/src/common/docman/Document.class.php
@@ -135,10 +135,11 @@ class Document extends FFError {
         * @param       string  $title                  The title of this 
document.
         * @param       string  $description            The description of this 
document.
         * @param       int     $stateid                The state id of the 
document. At creation, cannot be deleted status.
+        * @param       string  $vcomment               The comment of the new 
created version
         * @param       int     $createtimestamp        Timestamp of the 
creation of this document
         * @return      bool    success.
         */
-       function create($filename, $filetype, $data, $doc_group, $title, 
$description, $stateid = 0, $createtimestamp = null) {
+       function create($filename, $filetype, $data, $doc_group, $title, 
$description, $stateid = 0, $vcomment = '', $createtimestamp = null) {
                if (strlen($title) < 5) {
                        $this->setError(_('Title Must Be At Least 5 
Characters'));
                        return false;
@@ -205,7 +206,7 @@ class Document extends FFError {
                }
 
                $dv = new DocumentVersion($this);
-               $idversion = $dv->create($docid, $title, $description, 
$user_id, $filetype, $filename, $filesize, $kwords, $createtimestamp, 1, 1);
+               $idversion = $dv->create($docid, $title, $description, 
$user_id, $filetype, $filename, $filesize, $kwords, $createtimestamp, 1, 1, 
$vcomment);
                if (!$idversion) {
                        $this->setError($dv->getErrorMessage());
                        db_rollback();
@@ -799,9 +800,10 @@ class Document extends FFError {
         * @param       int     $current_version        Is the current version? 
default is 1.
         * @param       int     $new_version            To create a new 
version? default is 0. == No.
         * @param       int     $updatetimestamp        Timestamp of this 
update.
+        * @param       string  $vcomment               The comment of this 
version
         * @return      boolean success.
         */
-       function update($filename, $filetype, $data, $doc_group, $title, 
$description, $stateid, $version = 1, $current_version = 1, $new_version = 0, 
$updatetimestamp = null) {
+       function update($filename, $filetype, $data, $doc_group, $title, 
$description, $stateid, $version = 1, $current_version = 1, $new_version = 0, 
$updatetimestamp = null, $vcomment = '') {
 
                $perm =& $this->Group->getPermission();
                if (!$perm || !is_object($perm) || !$perm->isDocEditor()) {
@@ -878,14 +880,14 @@ class Document extends FFError {
                        if (isset($kwords)) {
                                $version_kwords = $kwords;
                        }
-                       $serial_id = $dv->create($this->getID(), $title, 
$description, user_getid(), $filetype, $filename, $filesize, $version_kwords, 
$updatetimestamp, $version, $current_version);
+                       $serial_id = $dv->create($this->getID(), $title, 
$description, user_getid(), $filetype, $filename, $filesize, $version_kwords, 
$updatetimestamp, $version, $current_version, $vcomment);
                        if (!$serial_id) {
                                $this->setOnUpdateError(_('Error updating 
document version')._(': ').$dv->getErrorMessage());
                                db_rollback();
                                return false;
                        }
                } else {
-                       if ($dv->isError() || !$dv->update($version, $title, 
$description, $filetype, $filename, $filesize, $updatetimestamp, 
$current_version)) {
+                       if ($dv->isError() || !$dv->update($version, $title, 
$description, $filetype, $filename, $filesize, $updatetimestamp, 
$current_version, $vcomment)) {
                                $this->setOnUpdateError(_('Error updating 
document version')._(': ').$dv->getErrorMessage());
                                db_rollback();
                                return false;
diff --git a/src/common/docman/DocumentVersion.class.php 
b/src/common/docman/DocumentVersion.class.php
index fb97986..ea7ede7 100644
--- a/src/common/docman/DocumentVersion.class.php
+++ b/src/common/docman/DocumentVersion.class.php
@@ -113,6 +113,10 @@ class DocumentVersion extends FFError {
                return $this->data_array['description'];
        }
 
+       function getComment() {
+               return $this->data_array['vcomment'];
+       }
+
        /**
         * getFileData - the filedata of this document.
         *
@@ -134,7 +138,7 @@ class DocumentVersion extends FFError {
 
        function fetchData($verid) {
                // everything but data_words. Too much memory consumption.
-               $res = db_query_params('SELECT serial_id, version, docid, 
current_version, title, updatedate, createdate, created_by, description, 
filename, filetype, filesize FROM doc_data_version WHERE version = $1 AND docid 
= $2',
+               $res = db_query_params('SELECT serial_id, version, docid, 
current_version, title, updatedate, createdate, created_by, description, 
filename, filetype, filesize, vcomment FROM doc_data_version WHERE version = $1 
AND docid = $2',
                                        array($verid, 
$this->Document->getID()));
                if (!$res || db_numrows($res) < 1) {
                        $this->setError(_('DocumentVersion')._(': ')._('Invalid 
version id'));
@@ -161,11 +165,11 @@ class DocumentVersion extends FFError {
         * @param       int     $current_version        Is it the current 
version? Defaut is 1 (yes)
         * return       bool    true on success
         */
-       function create($docid, $title, $description, $created_by, $filetype, 
$filename, $filesize, $kwords, $createtimetamp, $version = 1, $current_version 
= 1) {
+       function create($docid, $title, $description, $created_by, $filetype, 
$filename, $filesize, $kwords, $createtimetamp, $version = 1, $current_version 
= 1, $vcomment = '') {
                db_begin();
-               $res = db_query_params('INSERT INTO doc_data_version (docid, 
title, description, created_by, filetype, filename, filesize, data_words, 
version, current_version, createdate)
-                                       VALUES ($1, $2, $3, $4, $5, $6, $7, $8, 
$9, $10, $11)',
-                                       array($docid, htmlspecialchars($title), 
htmlspecialchars($description), $created_by, $filetype, $filename, $filesize, 
$kwords, $version, $current_version, $createtimetamp));
+               $res = db_query_params('INSERT INTO doc_data_version (docid, 
title, description, created_by, filetype, filename, filesize, data_words, 
version, current_version, createdate, vcomment)
+                                       VALUES ($1, $2, $3, $4, $5, $6, $7, $8, 
$9, $10, $11, $12)',
+                                       array($docid, htmlspecialchars($title), 
htmlspecialchars($description), $created_by, $filetype, $filename, $filesize, 
$kwords, $version, $current_version, $createtimetamp, 
htmlspecialchars($vcomment)));
                $serial_id = db_insertid($res, 'doc_data_version', 'serial_id');
                if (!$res || !$serial_id) {
                        $this->setError(_('Document Version')._(': ')._('Cannot 
create version.').' '.db_error());
@@ -202,7 +206,8 @@ class DocumentVersion extends FFError {
                }
                if ($this->getNumberOfVersions() == 1) {
                        $this->getMaxVersionData();
-                       $this->update($this->data_array['version'], 
$this->data_array['title'], $this->data_array['description'], 
$this->data_array['filetype'], $this->data_array['filename'], 
$this->data_array['filesize'], $this->data_array['updatedate'], 1);
+                       $this->update($this->data_array['version'], 
$this->data_array['title'], $this->data_array['description'], 
$this->data_array['filetype'],
+                                       $this->data_array['filename'], 
$this->data_array['filesize'], $this->data_array['updatedate'], 1, 
$this->data_array['vcomment']);
                }
                db_commit();
                db_free_result($res);
@@ -284,10 +289,10 @@ class DocumentVersion extends FFError {
         * @param       int     $current_version        Is the current version 
to set? Default is yes.
         * @return      bool    true on success
         */
-       function update($version, $title, $description, $filetype, $filename, 
$filesize, $updatetimestamp, $current_version = 1) {
+       function update($version, $title, $description, $filetype, $filename, 
$filesize, $updatetimestamp, $current_version = 1, $vcomment = '') {
                db_begin();
-               $colArr = array('title', 'description', 'filetype', 'filename', 
'filesize', 'current_version', 'updatedate');
-               $valArr = array(htmlspecialchars($title), 
htmlspecialchars($description), $filetype, $filename, $filesize, 
$current_version, $updatetimestamp);
+               $colArr = array('title', 'description', 'filetype', 'filename', 
'filesize', 'current_version', 'updatedate', 'vcomment');
+               $valArr = array(htmlspecialchars($title), 
htmlspecialchars($description), $filetype, $filename, $filesize, 
$current_version, $updatetimestamp, htmlspecialchars($vcomment));
                if (!$this->setValueinDB($version, $colArr, $valArr)) {
                        db_rollback();
                        return false;
@@ -341,6 +346,7 @@ class DocumentVersion extends FFError {
 
                $qpa = db_construct_qpa(false, 'UPDATE doc_data_version SET ');
                for ($i = 0; $i < count($colArr); $i++) {
+                       $qpa_string = '';
                        switch ($colArr[$i]) {
                                case 'filesize':
                                case 'title':
@@ -349,12 +355,12 @@ class DocumentVersion extends FFError {
                                case 'filename':
                                case 'updatedate':
                                case 'data_words':
-                               case 'current_version': {
+                               case 'current_version':
+                               case 'vcomment': {
                                        if ($i) {
-                                               $qpa = db_construct_qpa($qpa, 
',');
+                                               $qpa_string .= ',';
                                        }
-                                       $qpa = db_construct_qpa($qpa, 
$colArr[$i]);
-                                       $qpa = db_construct_qpa($qpa, ' = $1 ', 
array($valArr[$i]));
+                                       $qpa = db_construct_qpa($qpa, 
$qpa_string.$colArr[$i].' = $1 ', array($valArr[$i]));
                                        break;
                                }
                                default: {
@@ -372,13 +378,15 @@ class DocumentVersion extends FFError {
                }
                for ($i = 0; $i < count($colArr); $i++) {
                        switch ($colArr[$i]) {
+                               // we do not store data_words in memory!
                                case 'filesize':
                                case 'title':
                                case 'description':
                                case 'filetype':
                                case 'filename':
                                case 'updatedate':
-                               case 'current_version': {
+                               case 'current_version':
+                               case 'vcomment': {
                                        $this->data_array[$colArr[$i]] = 
$valArr[$i];
                                }
                        }
diff --git a/src/common/docman/DocumentVersionFactory.class.php 
b/src/common/docman/DocumentVersionFactory.class.php
index 363cdc3..e2fb636 100644
--- a/src/common/docman/DocumentVersionFactory.class.php
+++ b/src/common/docman/DocumentVersionFactory.class.php
@@ -60,7 +60,8 @@ class DocumentVersionFactory extends FFError {
        function getVersions($limit = 0, $start = 0) {
                global $HTML;
                $versions = array();
-               $res = db_query_params('SELECT serial_id, version, docid, 
current_version, title, updatedate, createdate, created_by, description, 
filename, filetype, filesize FROM doc_data_version WHERE docid = $1 ORDER by 
version ASC',
+               // everything but data_words! Too much memory consumption.
+               $res = db_query_params('SELECT serial_id, version, docid, 
current_version, title, updatedate, createdate, created_by, description, 
filename, filetype, filesize, vcomment FROM doc_data_version WHERE docid = $1 
ORDER by version ASC',
                                        array($this->Document->getID()), 
$limit, $start);
                if ($res) {
                        $numrows = db_numrows($res);
@@ -85,7 +86,7 @@ class DocumentVersionFactory extends FFError {
                                if (preg_match('/html/i', $arr['filetype'])) { 
// text plain, text html, text x-patch, etc
                                        $isHtml = 1;
                                }
-                               $arr['versionactions'][] = util_make_link('#', 
$HTML->getEditFilePic(_('Edit this version'), 'editversion'), array('id' => 
'version_action_edit', 'onclick' => 
'javascript:controllerListFile.toggleEditVersionView({title: 
\''.addslashes($arr['title']).'\', description: 
\''.addslashes($arr['description']).'\', version: '.$arr['version'].', 
current_version: '.$arr['current_version'].', isURL: '.$isURL.', isText: 
'.$isText.', isHtml: '.$isHtml.', filename: 
\''.addslashes($arr['filename']).'\'})'), true);
+                               $arr['versionactions'][] = util_make_link('#', 
$HTML->getEditFilePic(_('Edit this version'), 'editversion'), array('id' => 
'version_action_edit', 'onclick' => 
'javascript:controllerListFile.toggleEditVersionView({title: 
\''.addslashes($arr['title']).'\', description: 
\''.addslashes($arr['description']).'\', version: '.$arr['version'].', 
current_version: '.$arr['current_version'].', isURL: '.$isURL.', isText: 
'.$isText.', isHtml: '.$isHtml.', filename: 
\''.addslashes($arr['filename']).'\', vcomment: 
\''.addslashes($arr['vcomment']).'\'})'), true);
                                if ($numrows > 1) {
                                        $arr['versionactions'][] = 
util_make_link('#', $HTML->getRemovePic(_('Permanently delete this version'), 
'delversion'), array('id' => 'version_action_delete', 'onclick' => 
'javascript:controllerListFile.deleteVersion({version: '.$arr['version'].'})'), 
true);
                                }
diff --git a/src/common/docman/actions/addfile.php 
b/src/common/docman/actions/addfile.php
index bddba04..52ca75d 100644
--- a/src/common/docman/actions/addfile.php
+++ b/src/common/docman/actions/addfile.php
@@ -40,6 +40,7 @@ global $warning_msg;
 $doc_group = getIntFromRequest('doc_group');
 $title = trim(getStringFromRequest('title'));
 $description = getStringFromRequest('description');
+$vcomment = getStringFromRequest('vcomment');
 $file_url = getStringFromRequest('file_url');
 $uploaded_data = getUploadedFile('uploaded_data');
 $manual_path = getStringFromRequest('manual_path');
@@ -174,7 +175,7 @@ switch ($type) {
        }
 }
 
-if (!$d->create($uploaded_data_name, $uploaded_data_type, $data, $doc_group, 
$title, $description, $stateid)) {
+if (!$d->create($uploaded_data_name, $uploaded_data_type, $data, $doc_group, 
$title, $description, $stateid, $vcomment)) {
        $error_msg = $d->getErrorMessage();
        if (forge_check_perm('docman', $group_id, 'approve')) {
                session_redirect($redirecturl);
diff --git a/src/common/docman/actions/editfile.php 
b/src/common/docman/actions/editfile.php
index 12a5f7e..518d533 100644
--- a/src/common/docman/actions/editfile.php
+++ b/src/common/docman/actions/editfile.php
@@ -62,6 +62,7 @@ if (!forge_check_perm('docman', $g->getID(), 'approve')) {
 $docid = getIntFromRequest('docid');
 $title = getStringFromRequest('title');
 $description = getStringFromRequest('description');
+$vcomment = getStringFromRequest('vcomment');
 $details = getStringFromRequest('details');
 $file_url = getStringFromRequest('file_url');
 $uploaded_data = getUploadedFile('uploaded_data');
@@ -155,6 +156,7 @@ if ($version) {
        $filetype = $dv->getFileType();
        $title = $dv->getTitle();
        $description = $dv->getDescription();
+       $vcomment = $dv->getComment();
        $version = $current_version_radio;
        $current_version = 1;
 } else {
@@ -162,7 +164,7 @@ if ($version) {
        session_redirect($urlparam);
 }
 
-if (!$d->update($filename, $filetype, $data, $doc_group, $title, $description, 
$stateid, $version, $current_version, $new_version)) {
+if (!$d->update($filename, $filetype, $data, $doc_group, $title, $description, 
$stateid, $version, $current_version, $new_version, null, $vcomment)) {
        $error_msg = $d->getErrorMessage();
        session_redirect($urlparam);
 }
diff --git a/src/common/docman/views/addfile.php 
b/src/common/docman/views/addfile.php
index f21b830..5c89f77 100644
--- a/src/common/docman/views/addfile.php
+++ b/src/common/docman/views/addfile.php
@@ -106,13 +106,15 @@ if ($dgf->getNested($stateidArr) == NULL) {
        echo $HTML->listTableTop(array(), array(), 'infotable');
        $cells = array();
        $cells[][] = _('Document Title').utils_requiredField();
-       $cells[][] = html_e('input', array('pattern' => '.{5,}', 'placeholder' 
=> _('Document Title'), 'title' => sprintf(_('(at least %s characters)'), 5), 
'type' => 'text', 'name' => 'title', 'size' => '40', 'maxlength' => '255', 
'required' => 'required')).
-                       html_e('span', array(), sprintf(_('(at least %s 
characters)'), 5), false);
+       $cells[][] = html_e('input', array('pattern' => '.{5,}', 'placeholder' 
=> _('Document Title').' '.sprintf(_('(at least %s characters)'), 5), 'type' => 
'text', 'name' => 'title', 'size' => 40, 'maxlength' => 255, 'required' => 
'required'));
        echo $HTML->multiTableRow(array(), $cells);
        $cells = array();
        $cells[][] = _('Description') .utils_requiredField();
-       $cells[][] = html_e('input', array('pattern' => '.{10,}', 'placeholder' 
=> _('Description'), 'title' => sprintf(_('(at least %s characters)'), 10), 
'type' => 'text', 'name' => 'description', 'size' => '50', 'maxlength' => 
'255', 'required' => 'required')).
-                       html_e('span', array(), sprintf(_('(at least %s 
characters)'), 10), false);
+       $cells[][] = html_e('textarea', array('pattern' => '.{10,}', 
'placeholder' => _('Description').' '.sprintf(_('(at least %s characters)'), 
10), 'name' => 'description', 'rows' => 5, 'cols' => 50, 'maxlength' => 255, 
'required' => 'required'), '', false);
+       echo $HTML->multiTableRow(array(), $cells);
+       $cells = array();
+       $cells[][] = _('Comment');
+       $cells[][] = html_e('textarea', array('placeholder' => _('Add free 
comment'), 'name' => 'vcomment', 'rows' => 5, 'cols' => 50, 'maxlength' => 
255), '', false);
        echo $HTML->multiTableRow(array(), $cells);
        $cells = array();
        $cells[][] = _('Type of Document') .utils_requiredField();
diff --git a/src/common/docman/views/editfile.php 
b/src/common/docman/views/editfile.php
index f6910f5..0b13722 100644
--- a/src/common/docman/views/editfile.php
+++ b/src/common/docman/views/editfile.php
@@ -66,8 +66,8 @@ $cells[] = array(_('State')._(':'), 'class' => 
'docman_editfile_title');
 $cells[][] = html_e('select', array('name' => 'stateid', 'id' => 'stateid'), 
'', false);
 echo $HTML->multiTableRow(array(), $cells);
 echo $HTML->listTableBottom();
-$thArr = array(_('Current'), _('Filename'), _('Title'), _('Description'), 
_('Author'), _('Last Time'), _('Size'), _('Actions'));
-$thClass = array('unsortable', '', '', '', '', '', '', 'unsortable');
+$thArr = array(_('VersionID/Current'), _('Filename'), _('Title'), 
_('Description'), _('Comment'), _('Author'), _('Last Time'), _('Size'), 
_('Actions'));
+$thClass = array('', '', '', '', '', '', '', '', 'unsortable');
 echo $HTML->listTableTop($thArr, array(), 'sortable full', 
'sortable_doc_version_table', $thClass);
 echo $HTML->listTableBottom();
 echo html_e('button', array('id' => 'doc_version_addbutton', 'type' => 
'button', 'onclick' => 'javascript:controllerListFile.toggleAddVersionView()'), 
_('Add new version'));
@@ -80,6 +80,10 @@ $cells = array();
 $cells[] = array(_('Description').utils_requiredField()._(':'), 'class' => 
'docman_editfile_description');
 $cells[][] = html_e('textarea', array('pattern' => '.{10,}', 'title' => 
sprintf(_('(at least %s characters)'), 10), 'id' => 'description', 'name' => 
'description', 'maxlength' => '255', 'rows' => '5', 'cols' => '50'), '', false);
 echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(_('Comment')._(':'), 'class' => 'docman_editfile_comment');
+$cells[][] = html_e('textarea', array('id' => 'vcomment', 'name' => 
'vcomment', 'maxlength' => '255', 'rows' => '5', 'cols' => '50'), '', false);
+echo $HTML->multiTableRow(array(), $cells);
 if ($g->useDocmanSearch()) {
        $cells = array();
        $cells[] =  array(_('Both fields are used by the document search 
engine.'), 'colspan' => 2);
diff --git a/src/db/20160712-docman-add-version-comment-column.sql 
b/src/db/20160712-docman-add-version-comment-column.sql
new file mode 100644
index 0000000..987ff16
--- /dev/null
+++ b/src/db/20160712-docman-add-version-comment-column.sql
@@ -0,0 +1 @@
+ALTER TABLE doc_data_version ADD COLUMN vcomment character varying(255) 
DEFAULT ''::character varying NOT NULL;
diff --git a/src/www/docman/scripts/DocManController.js 
b/src/www/docman/scripts/DocManController.js
index 8877873..95dd37e 100644
--- a/src/www/docman/scripts/DocManController.js
+++ b/src/www/docman/scripts/DocManController.js
@@ -410,10 +410,10 @@ DocManListFileController.prototype =
                                        jQuery('#sortable_doc_version_table > 
tbody').children().remove();
                                        eachdocparams = this.docparams;
                                        jQuery.each(data, function (i, val) {
-                                               //_('Current'), _('Filename'), 
_('Title'), _('Description'), _('Author'), _('Last Time'), _('Size'), 
_('Actions'));
-                                               currenttdcontent = 
jQuery('<input id="doc_version_cv_radio" name="doc_version_cv_radio" 
type="checkbox" value="'+val.version+'" onclick="return false" >');
+                                               //_('VersionID/Current'), 
_('Filename'), _('Title'), _('Description'), _('Comment'), _('Author'), _('Last 
Time'), _('Size'), _('Actions'));
+                                               currenttdcontent = '';
                                                if (val.current_version == 1) {
-                                                       
currenttdcontent.attr('checked', 'checked');
+                                                       currenttdcontent += ' 
(x)';
                                                }
                                                if (eachdocparams.statusId != 
2) {
                                                        filenametdcontent = 
jQuery('<a>'+val.filename+'</a>');
@@ -431,7 +431,7 @@ DocManListFileController.prototype =
                                                for (var i = 0; i < 
versionActionsArrayLength; i++) {
                                                        versionactiontdcontent 
+= val.versionactions[i];
                                                }
-                                               var htmlString = '<tr 
id="docversion'+val.version+'" 
><td>'+currenttdcontent[0].outerHTML+'</td><td>'+filenametdcontent[0].outerHTML+'</td><td>'+val.title+'</td><td>'+val.description+'</td><td>'+val.created_by_username+'</td><td>'+val.lastdate+'</td><td>'+val.filesize_readable+'</td><td>'+versionactiontdcontent+'</td></tr>'
+                                               var htmlString = '<tr 
id="docversion'+val.version+'" 
><td>'+val.version+currenttdcontent+'</td><td>'+filenametdcontent[0].outerHTML+'</td><td>'+val.title+'</td><td>'+val.description+'</td><td>'+val.vcomment+'</td><td>'+val.created_by_username+'</td><td>'+val.lastdate+'</td><td>'+val.filesize_readable+'</td><td>'+versionactiontdcontent+'</td></tr>'
                                                
jQuery('#sortable_doc_version_table > tbody:last-child').append(htmlString);
                                                });
                                }
@@ -510,6 +510,7 @@ DocManListFileController.prototype =
                        }
                        jQuery('#title').val(this.version.title);
                        jQuery('#description').val(this.version.description);
+                       jQuery('#vcomment').val(this.version.vcomment);
                        jQuery('#edit_version').val(this.version.version);
                        if (this.version.current_version == 1) {
                                jQuery('#current_version').attr('checked', 
'checked').prop('checked', true);
@@ -520,6 +521,7 @@ DocManListFileController.prototype =
                        this.listfileparams.tableAddVersion.hide();
                        jQuery('#title').val('');
                        jQuery('#description').val('');
+                       jQuery('#vcomment').val('');
                        jQuery(':file').val('');
                        jQuery('#edit_version').val('');
                        jQuery('#current_version').removeAttr('checked');

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=3e802584fe5031a2de666b8ced1db45003648adc

commit 3e802584fe5031a2de666b8ced1db45003648adc
Author: Franck Villaume <[email protected]>
Date:   Fri Jul 15 12:34:40 2016 +0200

    less code & enable button jquery ui on button selector

diff --git a/src/www/themes/funky/Theme.class.php 
b/src/www/themes/funky/Theme.class.php
index acd1542..cb9c3fa 100644
--- a/src/www/themes/funky/Theme.class.php
+++ b/src/www/themes/funky/Theme.class.php
@@ -344,13 +344,11 @@ class Theme_Funky extends Layout {
                                jQuery("button").button();
                                jQuery(":submit").button();
                                jQuery(":reset").button();
+                               jQuery(":button").button();
                        });
                        //]]>'."\n";
-               echo html_ac(html_ap() -1);
                if ($use_tooltips) {
-                       echo html_ao('script', array('type' => 
'text/javascript'));
-                       echo '  //<![CDATA[
-                               jQuery(document).ready(
+                       echo '  jQuery(document).ready(
                                        function() {
                                                jQuery(document).tooltip({
                                                                show: {
@@ -364,10 +362,9 @@ class Theme_Funky extends Layout {
                                                                        }
                                                                });
                                        }
-                               );
-                       //]]>'."\n";
-                       echo html_ac(html_ap() -1);
+                               );'."\n";
                }
+               echo html_ac(html_ap() -1);
        }
 }
 

-----------------------------------------------------------------------

Summary of changes:
 src/common/docman/Document.class.php               | 12 +++++---
 src/common/docman/DocumentVersion.class.php        | 36 +++++++++++++---------
 src/common/docman/DocumentVersionFactory.class.php |  5 +--
 src/common/docman/actions/addfile.php              |  3 +-
 src/common/docman/actions/editfile.php             |  4 ++-
 src/common/docman/views/addfile.php                | 10 +++---
 src/common/docman/views/editfile.php               |  8 +++--
 .../20160712-docman-add-version-comment-column.sql |  1 +
 src/www/docman/scripts/DocManController.js         | 10 +++---
 src/www/themes/funky/Theme.class.php               | 11 +++----
 10 files changed, 60 insertions(+), 40 deletions(-)
 create mode 100644 src/db/20160712-docman-add-version-comment-column.sql


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to