Commit 594f9341 authored by Robert Knight's avatar Robert Knight

Rename <primary-action-btn> to <dropdown-menu-btn>

This is a more descriptive name explaining what the component
is for.

Card 89
parent ef919ead
...@@ -148,7 +148,7 @@ module.exports = angular.module('h', [ ...@@ -148,7 +148,7 @@ module.exports = angular.module('h', [
.directive('tabReveal', require('./directive/tab-reveal')) .directive('tabReveal', require('./directive/tab-reveal'))
.directive('shareDialog', require('./directive/share-dialog')) .directive('shareDialog', require('./directive/share-dialog'))
.directive('windowScroll', require('./directive/window-scroll')) .directive('windowScroll', require('./directive/window-scroll'))
.directive('primaryActionBtn', require('./directive/primary-action-btn')) .directive('dropdownMenuBtn', require('./directive/dropdown-menu-btn'))
.directive('publishAnnotationBtn', require('./directive/publish-annotation-btn')) .directive('publishAnnotationBtn', require('./directive/publish-annotation-btn'))
.filter('converter', require('./filter/converter')) .filter('converter', require('./filter/converter'))
......
...@@ -20,6 +20,6 @@ module.exports = function () { ...@@ -20,6 +20,6 @@ module.exports = function () {
dropdownMenuLabel: '@', dropdownMenuLabel: '@',
onToggleDropdown: '&', onToggleDropdown: '&',
}, },
templateUrl: 'primary_action_btn.html' templateUrl: 'dropdown_menu_btn.html'
}; };
}; };
...@@ -7,7 +7,7 @@ $base-line-height: 20px; ...@@ -7,7 +7,7 @@ $base-line-height: 20px;
@import './common'; @import './common';
// components // components
@import './primary-action-btn'; @import './dropdown-menu-btn';
@import './publish-annotation-btn'; @import './publish-annotation-btn';
body { body {
......
// the primary action button for a form // the primary action button for a form
.primary-action-btn { .dropdown-menu-btn {
$default-background-color: #626262; $default-background-color: #626262;
$hover-background-color: #3A3A3A; $hover-background-color: #3A3A3A;
$h-padding: 9px; $h-padding: 9px;
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
<div class="annotation-form-actions" ng-if="vm.editing" ng-switch="vm.action"> <div class="annotation-form-actions" ng-if="vm.editing" ng-switch="vm.action">
<button ng-switch-when="delete" <button ng-switch-when="delete"
ng-click="vm.save()" ng-click="vm.save()"
class="primary-action-btn"><i class="h-icon-check btn-icon"></i> Delete</button> class="dropdown-menu-btn"><i class="h-icon-check btn-icon"></i> Delete</button>
<publish-annotation-btn <publish-annotation-btn
group="vm.group()" group="vm.group()"
is-shared="vm.isShared()" is-shared="vm.isShared()"
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
Uses a <div> rather than a <button> so that hover states for child elements work Uses a <div> rather than a <button> so that hover states for child elements work
in Firefox. See https://bugzilla.mozilla.org/show_bug.cgi?id=843003 in Firefox. See https://bugzilla.mozilla.org/show_bug.cgi?id=843003
!--> !-->
<div aria-role="button" class="primary-action-btn"> <div aria-role="button" tabindex="0" class="dropdown-menu-btn">
<div class="primary-action-btn__label" ng-bind="label"></div> <div class="dropdown-menu-btn__label" ng-bind="label"></div>
<div <div
class="primary-action-btn__dropdown-arrow" class="dropdown-menu-btn__dropdown-arrow"
title="{{dropdownMenuLabel}}" title="{{dropdownMenuLabel}}"
ng-click="vm.toggleDropdown($event)"> ng-click="vm.toggleDropdown($event)">
<div class="primary-action-btn__dropdown-arrow-separator"></div> <div class="dropdown-menu-btn__dropdown-arrow-separator"></div>
<div class="primary-action-btn__dropdown-arrow-indicator"> <div class="dropdown-menu-btn__dropdown-arrow-indicator">
<div></div> <div></div>
</div> </div>
</div> </div>
......
<div dropdown="" class="publish-annotation-btn__btn" is-open="vm.showDropdown"> <div dropdown="" class="publish-annotation-btn__btn" is-open="vm.showDropdown">
<primary-action-btn <dropdown-menu-btn
label="'Post to ' + vm.publishDestination" label="'Post to ' + vm.publishDestination"
ng-click="vm.save()" ng-click="vm.save()"
on-toggle-dropdown="vm.showDropdown = !vm.showDropdown" on-toggle-dropdown="vm.showDropdown = !vm.showDropdown"
title="Publish this annotation to {{vm.publishDestination}}" title="Publish this annotation to {{vm.publishDestination}}"
dropdown-menu-label="Change annotation sharing setting"> dropdown-menu-label="Change annotation sharing setting">
</primary-action-btn> </dropdown-menu-btn>
<ul class="dropdown-menu pull-right publish-annotation-btn__dropdown-menu" role="menu"> <ul class="dropdown-menu pull-right publish-annotation-btn__dropdown-menu" role="menu">
<li ng-click="vm.setShared()"> <li ng-click="vm.setShared()">
<a href=""> <a href="">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment