javascript - Custom edit menu Angular Dashboard Framework -


i'm working angular dashboard framework (sdorra) , change edit menu; enter image description here

at default click on menu can add widget, edit dashboard, save , discard changes show below.

enter image description here

i add new icon new function, in particolar case, add duplication function of dashboard.

my html follow:

<div ng-app="isdashboard" ng-controller="dashboardcontroller"                               ng-init="init('$name','$id', '$sid')" style="color:#a60076">     <adf-dashboard name="dashboard" adf-model="dashboard.model" /> </div> 

and controller is

'use strict'; var model = {     rows: [{         columns: [{             styleclass: 'col-md-4',             widgets: []         },{             styleclass: 'col-md-8',             widgets: []         }]     }] };  angular.module('isdashboard', ['adf', 'adf.widget.clock']) .config(function(dashboardprovider){     dashboardprovider.structure('4-8', {         rows: [{             columns: [{                 styleclass: 'col-md-4',                 widgets: []             }, {                 styleclass: 'col-md-8',                 widgets: []             }]         }]     }),      dashboardprovider.structure('6-6', {         rows: [{             columns: [{                 styleclass: 'col-md-6',                 widgets: []             }, {                 styleclass: 'col-md-6',                 widgets: []              }]          }]       })    })    .controller('dashboardcontroller', function($scope, $http){         $scope.init = function(name, id, sid){           ....    };     $scope.dashboard = {        model: model    }; }); 

i know there's possibility change menu example http://angular-dashboard-framework.github.io/angular-dashboard-framework/#/sample/03 , won't solution.

is possible add item @ default menu?

thanks in advance

regards

i solve problem, mixed solutions. first of created edittitletemplate default:

<h1> {{model.title}} <span style="font-size: 16px" class=pull-right>  <a href ng-if=editmode title="custom item" ng-click=callevent('adfdashboardcustom')>      <i class="glyphicon glyphicon-repeat adf-flip"></i> </a>  <a href ng-if=editmode title="add new widget" ng-click=addwidgetdialog()>     <i class="glyphicon glyphicon-plus-sign"></i> </a>   <a href ng-if=editmode title="edit dashboard" ng-click=editdashboarddialog()>     <i class="glyphicon glyphicon-cog"></i> </a>   <a href ng-if=options.editable title="{{editmode ? 'save changes' : 'enable edit mode'}}" ng-click=toggleeditmode()>     <i class=glyphicon x-ng-class="{'glyphicon-edit' : !editmode, 'glyphicon-save' : editmode}"></i> </a>  <a href ng-if=editmode title="undo changes" ng-click=canceleditmode()>     <i class="glyphicon glyphicon-repeat adf-flip"></i>  </a> 

at ng-click callevent function call. function added in library:

$scope.callevent = function(param){     $rootscope.$broadcast(param, name, model); }; 

the event handled dashboard this:

$scope.$on('adfdashboardcustom', function (event, name, model) {     //dosomething } 

i hope efforts useful someonelse.

regards


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -