Add click-to-edit dashboard title

This commit is contained in:
Rashid Khan 2014-03-04 11:44:34 -07:00
parent 43f1a315bb
commit 13baa44e98
2 changed files with 8 additions and 1 deletions

View file

@ -2,9 +2,14 @@
<nav class="navbar navbar-default navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<span class="navbar-brand pull-left">
<span class="navbar-brand pull-left" ng-click="editingTitle = true" ng-hide="editingTitle">
{{dashboard.title}}
</span>
<span class="pull-left" ng-show="editingTitle">
<form class="navbar-form" ng-submit="editingTitle = false">
<input type="text" ng-model="dashboard.title" class="form-control"/>
</form>
</span>
</div>
<ul class="nav navbar-nav pull-left">

View file

@ -39,6 +39,8 @@ define(function (require) {
var init = function () {
$scope.editingTitle = false;
// Passed in the grid attr to the directive so we can access the directive's function from
// the controller and view
$scope.gridControl = {};