Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:webhook/webhook-cms
Browse files Browse the repository at this point in the history
  • Loading branch information
snide committed Mar 21, 2014
2 parents 08c2a6a + 83e752c commit d6b8ecd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/routes/wh/content/type/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default Ember.Route.extend({
cmsControls = contentType.get('controls');

controller.set('cmsControls', cmsControls);
controller.set('columnChoices', cmsControls.rejectBy('name', 'preview_url'));
controller.set('contentType', contentType);

var lockedItems = Ember.A([]),
Expand Down
2 changes: 1 addition & 1 deletion app/templates/wh/content/type/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<span class="btn btn-neutral btn-small icon icon-table"> Display <span class="caret"></span></span>
<dl class="wy-dropdown-menu">
<dt>Show columns</dt>
{{#each contentType.controls}}
{{#each columnChoices}}
<dd>
<span {{bind-attr class=":icon showInCms:icon-ok-sign:icon-circle-blank"}} {{action "toggleShowInCms" this on="click"}}>
{{label}}
Expand Down
2 changes: 2 additions & 0 deletions app/utils/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export default function dataFromControls (controls) {
// add timezone to datetime values
if (control.get('controlType.widget') === 'datetime') {
value = moment(value).format();
// add extra data for sorting
data['_sort_' + control.get('name')] = moment(value).unix();
}

data[control.get('name')] = value;
Expand Down

0 comments on commit d6b8ecd

Please sign in to comment.