Commit 40a95bed by Rashid Khan

Tweaked pulldown editor path

parent d3495ff7
......@@ -68,9 +68,18 @@ function (angular, config, _) {
return { 'min-height': row.collapse ? '5px' : row.height };
};
$scope.edit_path = function(type) {
$scope.panel_path =function(type) {
if(type) {
return 'app/panels/'+type.replace(".","/")+'/editor.html';
return 'app/panels/'+type.replace(".","/");
} else {
return false;
}
};
$scope.edit_path = function(type) {
var p = $scope.panel_path(type);
if(p) {
return p+'/editor.html';
} else {
return false;
}
......
......@@ -159,7 +159,7 @@
</div>
<div ng-repeat="pulldown in dashboard.current.nav" ng-controller="PulldownCtrl" ng-show="editor.index == 4+$index">
<ng-include ng-show="pulldown.enable" src="'./app/panels/'+pulldown.type+'/editor.html'"></ng-include>
<ng-include ng-show="pulldown.enable" src="edit_path(pulldown.type)"></ng-include>
<button ng-hide="pulldown.enable" class="btn" ng-click="pulldown.enable = true">Enable the {{pulldown.type}}</button>
</div>
......
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