Display help pages

This commit is contained in:
Xavier Guimard 2015-07-22 20:43:20 +00:00
parent a31c256c63
commit b3b2d7db01
2 changed files with 11 additions and 5 deletions

View File

@ -71,6 +71,7 @@
$scope.confPrefix = confPrefix;
$scope.message = {};
$scope.result = '';
$scope.helpUrl = 'start.html#configuration';
/* Modal launcher */
$scope.showModal = function(tpl) {
@ -510,6 +511,13 @@
});
}
var showHelp = function(scope) {
while (!scope.$modelValue.help && scope.$parentNodeScope) {
scope = scope.$parentNodeScope;
}
$scope.helpUrl = scope.$modelValue.help || 'start.html#configuration';
}
/* Form management
*
* `currentNode` contains the last select node
@ -546,6 +554,7 @@
});
}
$scope.showT = false;
showHelp(scope);
};
$scope.keyWritable = function(scope) {
@ -731,4 +740,4 @@
};
}]);
})();
})();

View File

@ -35,10 +35,7 @@
<!-- Help container -->
<div id="bottom" class="hidden-xs">
<div class="vresizer" resizer="horizontal" resizer-top="#top" resizer-bottom="#bottom"></div>
<div class="scrollable-sm">
<h3>Data binding</h3>
<pre class="code">{{ data | json }}</pre>
</div>
<iframe width="100%" height="100%" ng-src="{{'/doc/pages/documentation/current/'+helpUrl}}" frameborder="0"></iframe>
</div>
</div>
</div>