From 06abeb2b92945448b45ae849a0c8e7da1be19def Mon Sep 17 00:00:00 2001 From: Shaun Chyxion Date: Sat, 19 Aug 2017 17:18:32 +0800 Subject: [PATCH] update --- .../DefaultHttpRequestInterceptor.java | 2 +- web/app/components/ace-login.js | 1 + web/app/components/form-footer-buttons.js | 1 + web/app/components/form-input-spinner.js | 1 + web/app/components/form-input.js | 3 ++ web/app/routes/customer-issue/edit.js | 3 +- web/app/templates/components/form-input.hbs | 3 ++ web/app/templates/customer/list.hbs | 38 +++++++++---------- 8 files changed, 30 insertions(+), 22 deletions(-) diff --git a/server/web-common/src/main/java/com/pudonghot/ambition/web/interceptor/DefaultHttpRequestInterceptor.java b/server/web-common/src/main/java/com/pudonghot/ambition/web/interceptor/DefaultHttpRequestInterceptor.java index 8575125..2c4eef6 100644 --- a/server/web-common/src/main/java/com/pudonghot/ambition/web/interceptor/DefaultHttpRequestInterceptor.java +++ b/server/web-common/src/main/java/com/pudonghot/ambition/web/interceptor/DefaultHttpRequestInterceptor.java @@ -32,7 +32,7 @@ public class DefaultHttpRequestInterceptor implements TigonHandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - log.info("Request [{}] With Params [{}].", request.getRequestURI(), request.getParameterMap()); + log.debug("Request [{}] With Params [{}].", request.getRequestURI(), request.getParameterMap()); request.setAttribute("startTime", System.currentTimeMillis()); return true; } diff --git a/web/app/components/ace-login.js b/web/app/components/ace-login.js index 59746e2..a6461ff 100644 --- a/web/app/components/ace-login.js +++ b/web/app/components/ace-login.js @@ -23,6 +23,7 @@ export default Ember.Component.extend({ }, didInsertElement() { let me = this; + me._super(...arguments); Ember.$('body').removeClass().addClass('login-layout blur-login'); }, willDestroy() { diff --git a/web/app/components/form-footer-buttons.js b/web/app/components/form-footer-buttons.js index c30b807..87e024a 100644 --- a/web/app/components/form-footer-buttons.js +++ b/web/app/components/form-footer-buttons.js @@ -7,6 +7,7 @@ export default BaseComponent.extend({ form: true, didReceiveAttrs() { const me = this; + me._super(...arguments); let backRouteName = me.get('backRouteName'); if (Ember.isNone(backRouteName)) { let listRouteName = me.get('routeName').replace(/[^.]+$/, 'list'); diff --git a/web/app/components/form-input-spinner.js b/web/app/components/form-input-spinner.js index 6009ea3..146e982 100644 --- a/web/app/components/form-input-spinner.js +++ b/web/app/components/form-input-spinner.js @@ -7,6 +7,7 @@ export default BaseFormInput.extend({ max: 64, step: 1, didReceiveAttrs() { + this._super(...arguments); this.getVal() || this.setVal(0); }, didInsertElement() { diff --git a/web/app/components/form-input.js b/web/app/components/form-input.js index 1bffd95..6d473bf 100644 --- a/web/app/components/form-input.js +++ b/web/app/components/form-input.js @@ -6,12 +6,15 @@ export default BaseFormInput.extend({ type: 'text', isHidden: Ember.computed.equal('type', 'hidden'), classNameBindings: ['isHidden:hidden'], + rows: 8, setFilename(filename) { let me = this; Ember.set(me.get('model'), me.get('name'), filename); }, didReceiveAttrs() { let me = this; + me._super(...arguments); + let isFile = me.get('type') === 'file'; !me.get('input-class') && me.set('input-class', isFile ? 'col-xs-3' : 'col-xs-12 col-sm-5'); diff --git a/web/app/routes/customer-issue/edit.js b/web/app/routes/customer-issue/edit.js index c39f492..4e7092a 100644 --- a/web/app/routes/customer-issue/edit.js +++ b/web/app/routes/customer-issue/edit.js @@ -5,7 +5,8 @@ export default BaseEditRoute.extend({ afterModel(model) { let me = this; let customerId = model.customerId; - this.set('breadcrumbs', + Ember.Logger.info('edit: ', model); + me.set('breadcrumbs', [{route: 'customer.list', params: 1, text: 'Customers'}, {route: 'customer.show', params: customerId, text: 'Customer [' + customerId + ']'}, {text: 'Edit Customer [' + customerId + '] Comment'}]); diff --git a/web/app/templates/components/form-input.hbs b/web/app/templates/components/form-input.hbs index 424c5c2..5d532a1 100644 --- a/web/app/templates/components/form-input.hbs +++ b/web/app/templates/components/form-input.hbs @@ -7,8 +7,11 @@ {{#if (eq 'file' type)}} {{input class='col-xs-12' type='file' name=name}} {{else if (eq 'textarea' type)}} + {{log 'text area' dataModel}} {{textarea class='col-xs-12' name=name + rows=rows + cols=cols value=(mut (get dataModel name)) class='form-control' placeholder=(if placeholder placeholder label)}} diff --git a/web/app/templates/customer/list.hbs b/web/app/templates/customer/list.hbs index d14d324..5052ebf 100644 --- a/web/app/templates/customer/list.hbs +++ b/web/app/templates/customer/list.hbs @@ -43,20 +43,20 @@ {{sortable-th name='id' text='ID'}} {{/if}} {{#if tableOptions.showName}} - Name + Name {{/if}} {{#if tableOptions.showDateAdded}} - {{#sortable-th name='dateAdded'}} + {{#sortable-th name='dateAdded' style='min-width: 102px;'}} {{th-filter name='dateAdded' text='Added' label='Added Filter' options=model.dateAddedList}} {{/sortable-th}} {{/if}} {{#if tableOptions.showYears}} - {{#sortable-th name='year'}} + {{#sortable-th name='year' style='min-width: 82px'}} {{th-filter name='year' text='Year' label='Year Filter' options=model.latestYearList}} {{/sortable-th}} {{/if}} {{#if tableOptions.showYtdSale}} - {{sortable-th name='sumYtdSales' text='Sales'}} + {{sortable-th name='sumYtdSales' text='Sales' style='min-width: 102px;'}} {{/if}} {{#if tableOptions.showCountryCode}} @@ -64,27 +64,27 @@ {{/if}} {{#if tableOptions.showState}} - - {{th-filter name='state' text='State' label='State Filter' options=model.stateList}} + + {{th-filter name='state' text='State' label='State Filter' options=model.stateList}} {{/if}} {{#if tableOptions.showCity}} - - {{th-filter name='city' text='City' label='City Filter' options=model.cityList}} + + {{th-filter name='city' text='City' label='City Filter' options=model.cityList}} {{/if}} {{#if tableOptions.showMs}} - {{#sortable-th name='ms'}} + {{#sortable-th name='ms' style='min-width: 74px;'}} {{th-filter name='ms' text='MS' label='MS Filter' options=model.msList}} {{/sortable-th}} {{/if}} {{#if tableOptions.showRegion}} - {{#sortable-th name='region' text='Region'}} + {{#sortable-th name='region' text='Region' style='min-width: 100px;'}} {{th-filter name='region' text='Region' label='Region Filter' options=model.regionList}} {{/sortable-th}} {{/if}} {{#if tableOptions.showSalesperson}} - {{#sortable-th name='salesperson' text='Salesperson'}} + {{#sortable-th name='salesperson' text='Salesperson' style='min-width: 100px;'}} {{th-filter name='salesperson' text='Slspsn' label='Salesperson Filter' options=model.salespersonList}} {{/sortable-th}} {{/if}} @@ -120,7 +120,7 @@ {{/if}} {{#if tableOptions.showName}} - + {{it.name}} {{/if}} @@ -143,7 +143,6 @@ {{/if}} {{#if tableOptions.showYtdSale}} -
{{#if it.sumYtdSales}} {{#if it.expand}} @@ -156,7 +155,6 @@ {{/if}} {{/if}} {{number-us it.sumYtdSales}} -
{{/if}} {{#if tableOptions.showCountryCode}} @@ -195,7 +193,7 @@ {{/if}} {{#if tableOptions.showIssue1}} - + {{#if it.issue1}}
{{issue-cell issue=it.issue1.issue}} @@ -207,13 +205,13 @@ {{#link-to 'customer-issue.edit' it.issue1.id data-rel='tooltip' title='Edit Comment'}} - + {{/link-to}} {{/if}} {{/if}} {{#if tableOptions.showIssue2}} - + {{#if it.issue2}}
{{issue-cell issue=it.issue2.issue}} @@ -222,13 +220,13 @@ {{moment-format (if it.issue2.dateUpdated it.issue2.dateUpdated it.issue2.dateCreated) 'M/D/YYYY H:mm:ss'}} {{#link-to 'customer-issue.edit' it.issue2.id class="blue" data-rel='tooltip' title='Edit Comment'}} - + {{/link-to}} {{/if}} {{/if}} {{#if tableOptions.showIssue3}} - + {{#if it.issue3}}
{{issue-cell issue=it.issue3.issue}} @@ -237,7 +235,7 @@ {{moment-format (if it.issue3.dateUpdated it.issue3.dateUpdated it.issue3.dateCreated) 'M/D/YYYY H:mm:ss'}} {{#link-to 'customer-issue.edit' it.issue3.id class="blue" data-rel='tooltip' title='Edit Comment'}} - + {{/link-to}} {{/if}}