diff --git a/framework/core/ember/app/components/discussion-scrollbar.js b/framework/core/ember/app/components/discussion-scrollbar.js index f5589189c..e4acd0d5f 100644 --- a/framework/core/ember/app/components/discussion-scrollbar.js +++ b/framework/core/ember/app/components/discussion-scrollbar.js @@ -10,7 +10,7 @@ export default Ember.View.extend(PostStreamMixin, { @property templateName @type String */ - templateName: 'discussion-scrollbar', + templateName: 'components/discussion-scrollbar', classNames: ['scrubber', 'discussion-scrubber'], // An object which represents/ecapsulates the scrollbar. @@ -28,7 +28,7 @@ export default Ember.View.extend(PostStreamMixin, { windowWasResized: function(event) { var view = event.data.view; - view.scrollbar.$.height($('#sidebar-content').height() + $('#sidebar-content').offset().top - view.scrollbar.$.offset().top - 80); + // view.scrollbar.$.height($('#sidebar-content').height() + $('#sidebar-content').offset().top - view.scrollbar.$.offset().top - 80); view.scrollbar.update(); }, diff --git a/framework/core/ember/app/components/dropdown-button.js b/framework/core/ember/app/components/dropdown-button.js new file mode 100644 index 000000000..9b6b1a3d1 --- /dev/null +++ b/framework/core/ember/app/components/dropdown-button.js @@ -0,0 +1,21 @@ +import Ember from 'ember'; + +export default Ember.Component.extend({ + items: null, // NamedContainerView/Menu + layoutName: 'components/dropdown-button', + classNames: ['dropdown', 'btn-group'], + classNameBindings: ['itemCountClass'], + + title: 'Controls', + icon: 'ellipsis-v', + buttonClass: 'btn-default', + menuClass: 'pull-right', + + dropdownMenuClass: function() { + return 'dropdown-menu '+this.get('menuClass'); + }.property('menuClass'), + + itemCountClass: function() { + return 'item-count-'+this.get('items.length'); + }.property('items') +}); diff --git a/framework/core/ember/app/components/dropdown-split.js b/framework/core/ember/app/components/dropdown-split.js new file mode 100644 index 000000000..13b9cf5cc --- /dev/null +++ b/framework/core/ember/app/components/dropdown-split.js @@ -0,0 +1,24 @@ +import Ember from 'ember'; + +export default Ember.Component.extend({ + items: null, // NamedContainerView/Menu + layoutName: 'components/dropdown-split', + classNames: ['dropdown', 'dropdown-split', 'btn-group'], + classNameBindings: ['itemCountClass'], + + buttonClass: 'btn-default', + menuClass: 'pull-right', + icon: 'ellipsis-v', + + mainButtonClass: function() { + return 'btn '+this.get('buttonClass'); + }.property('buttonClass'), + + dropdownMenuClass: function() { + return 'dropdown-menu '+this.get('menuClass'); + }.property('menuClass'), + + itemCountClass: function() { + return 'item-count-'+this.get('items.length'); + }.property('items') +}); diff --git a/framework/core/ember/app/components/menu-split.js b/framework/core/ember/app/components/menu-split.js deleted file mode 100644 index cddbcf4dc..000000000 --- a/framework/core/ember/app/components/menu-split.js +++ /dev/null @@ -1,15 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ - items: null, // NamedContainerView/Menu - layoutName: 'components/menu-split', - show: 1, - - visibleItems: function() { - return this.get('items').slice(0, this.get('show')); - }.property('items'), - - hiddenItems: function() { - return this.get('items').slice(this.get('show')); - }.property('items'), -}); diff --git a/framework/core/ember/app/templates/components/dropdown-button.hbs b/framework/core/ember/app/templates/components/dropdown-button.hbs new file mode 100644 index 000000000..de9494ba0 --- /dev/null +++ b/framework/core/ember/app/templates/components/dropdown-button.hbs @@ -0,0 +1,8 @@ +{{#if items}} + + {{menu-list items=items class=dropdownMenuClass}} +{{/if}} \ No newline at end of file diff --git a/framework/core/ember/app/templates/components/dropdown-split.hbs b/framework/core/ember/app/templates/components/dropdown-split.hbs new file mode 100644 index 000000000..32931e96e --- /dev/null +++ b/framework/core/ember/app/templates/components/dropdown-split.hbs @@ -0,0 +1,8 @@ +{{#if items}} + {{view items.firstItem class=mainButtonClass}} + + {{menu-list items=items class=dropdownMenuClass}} +{{/if}} \ No newline at end of file diff --git a/framework/core/ember/app/templates/components/menu-split.hbs b/framework/core/ember/app/templates/components/menu-split.hbs deleted file mode 100644 index 13978bdd6..000000000 --- a/framework/core/ember/app/templates/components/menu-split.hbs +++ /dev/null @@ -1,13 +0,0 @@ -{{#if items}} -