diff --git a/src/app/directives/__test__/mcTextareaWithButton.spec.js b/src/app/directives/__test__/mcTextareaWithButton.spec.js
new file mode 100644
index 00000000..f4be73d2
--- /dev/null
+++ b/src/app/directives/__test__/mcTextareaWithButton.spec.js
@@ -0,0 +1,26 @@
+describe('Textarea with button directive', function() {
+ var $compile,
+ $rootScope;
+
+ // Load the myApp module, which contains the directive
+ beforeEach(module('myApp'));
+
+ // Store references to $rootScope and $compile
+ // so they are available to all tests in this describe block
+ beforeEach(inject(function(_$compile_, _$rootScope_){
+ // The injector unwraps the underscores (_) from around the parameter names when matching
+ $compile = _$compile_;
+ $rootScope = _$rootScope_;
+ }));
+
+ it('Replaces the element with the appropriate content', function() {
+ // Compile a piece of HTML containing the directive
+ var element =
+ $compile("")
+ ($rootScope);
+ // fire all the watches, so the scope expression {{1 + 1}} will be evaluated
+ $rootScope.$digest();
+ // Check that the compiled element contains the templated content
+ expect(element.html()).toContain("div");
+ });
+});
\ No newline at end of file
diff --git a/src/app/directives/index.js b/src/app/directives/index.js
index 7a5d002e..a16cedbd 100644
--- a/src/app/directives/index.js
+++ b/src/app/directives/index.js
@@ -459,4 +459,19 @@ angular.module('ripple-ui.directives', [])
});
}
};
+ })
+ .directive('mcTextareaWithButton', function () {
+ return{
+ restrict: 'E',
+ transclude: {
+ button: '?mcButton',
+ field: '?mcField'
+ },
+ template:
+ '
\n'
+ }
});
\ No newline at end of file
diff --git a/src/app/scss/components/_control.scss b/src/app/scss/components/_control.scss
index 6e59f0b0..72672557 100644
--- a/src/app/scss/components/_control.scss
+++ b/src/app/scss/components/_control.scss
@@ -2,6 +2,11 @@
@include clearfix;
&.hide-indent-bottom { margin-bottom: -5px; }
}
+.buttoned-control-group {
+ z-index: 9999;
+ position: absolute;
+ right: 0;
+}
.control-group {
margin-right: -5px;
& > * { margin-right: 5px; }