diff --git a/module/port/model.php b/module/port/model.php index dc43466488..f43b9fa7c5 100644 --- a/module/port/model.php +++ b/module/port/model.php @@ -1302,9 +1302,9 @@ class portModel extends model elseif($control == 'multiple') $html .= '' . html::select($name . "[]", $options, $selected, "multiple class='form-control picker-select nopicker' data-field='{$field}'") . ''; - elseif($control == 'date') $html .= '' . html::input("$name", $selected, "class='form-control form-date autocomplete='off'") . ''; + elseif($control == 'date') $html .= '' . html::input("$name", $selected, "class='form-control form-date' autocomplete='off'") . ''; - elseif($control == 'datetime') $html .= '' . html::input("$name", $selected, "class='form-control form-datetime autocomplete='off'") . ''; + elseif($control == 'datetime') $html .= '' . html::input("$name", $selected, "class='form-control form-datetime' autocomplete='off'") . ''; elseif($control == 'hidden') $html .= html::hidden("$name", $selected); diff --git a/module/port/view/footer.html.php b/module/port/view/footer.html.php index 589b212445..6fd32ded84 100644 --- a/module/port/view/footer.html.php +++ b/module/port/view/footer.html.php @@ -5,6 +5,8 @@ $.get(createLink('port', 'ajaxGetTbody','model=&lastID=0&pag $('#showData > tbody').append(data); if($('#showData tbody').find('tr').hasClass('showmore') === false) $('#showData tfoot').removeClass('hidden'); $('#showData tbody').find('.picker-select').picker({chosenMode: true}); + $('.form-date').datetimepicker('update'); + $('.form-datetime').datetimepicker('update'); }) window.addEventListener('scroll', this.handleScroll); @@ -34,6 +36,8 @@ function loadData($showmore) $showmore.after(data); if($('#showData tbody').find('tr').hasClass('showmore') === false) $('#showData tfoot').removeClass('hidden'); $('#showData tbody').find('.picker-select').picker({chosenMode: true}).removeClass('nopicker'); + $('.form-date').datetimepicker('update'); + $('.form-datetime').datetimepicker('update'); }) } diff --git a/module/story/config.php b/module/story/config.php index acd315ca26..3b8dfa5e26 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -109,6 +109,7 @@ $config->story->datatable->fieldList['plan']['title'] = 'planAB'; $config->story->datatable->fieldList['plan']['fixed'] = 'no'; $config->story->datatable->fieldList['plan']['width'] = '90'; $config->story->datatable->fieldList['plan']['required'] = 'no'; +$config->story->datatable->fieldList['plan']['control'] = 'select'; $config->story->datatable->fieldList['plan']['dataSource'] = array('module' => 'story', 'method' => 'getRelatedObjects', 'params' => 'plan&id,title'); $config->story->datatable->fieldList['source']['title'] = 'source'; diff --git a/module/story/model.php b/module/story/model.php index f9e08aa6eb..4e873e7ab7 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -5533,7 +5533,7 @@ class storyModel extends model /* Get users, products and relations. */ $users = $this->loadModel('user')->getPairs('noletter'); - $products = $this->product->getPairs('nocode'); + $products = $this->loadModel('product')->getPairs('nocode'); $relatedStoryIds = array(); foreach($stories as $story) $relatedStoryIds[$story->id] = $story->id;