enable homescreen without browser error

This commit is contained in:
soralee 2017-01-31 16:11:52 +09:00
parent 6b3881f816
commit c228f611cd
4 changed files with 7 additions and 19 deletions

View file

@ -84,7 +84,7 @@ limitations under the License.
ng-class="columnWidthClass(currentParagraph.config.colWidth)"
class="paragraph-col">
<div id="{{currentParagraph.id}}_paragraphColumn"
ng-if="currentParagraph.config.results"
ng-if="currentParagraph.results"
ng-include src="'app/notebook/paragraph/paragraph.html'"
ng-class="{'paragraph-space box paragraph-margin': !asIframe, 'focused': paragraphFocused}"
ng-hide="currentParagraph.config.tableHide && home.viewOnly">

View file

@ -39,19 +39,4 @@ limitations under the License.
</div>
<br/><br/><br/>
</div>
<!-- Load notebook -->
<div ng-show="home.notebookHome" id="{{currentParagraph.id}}_paragraphColumn_main"
ng-repeat="currentParagraph in home.note.paragraphs"
ng-controller="ParagraphCtrl"
ng-init="init(currentParagraph, home.note)"
ng-class="columnWidthClass(currentParagraph.config.colWidth)"
class="paragraph-col">
<div id="{{currentParagraph.id}}_paragraphColumn"
ng-if="currentParagraph.config.results"
ng-include src="'app/notebook/paragraph/paragraph.html'"
ng-class="{'paragraph-space box paragraph-margin': !asIframe, 'focused': paragraphFocused}"
ng-hide="currentParagraph.config.tableHide && home.viewOnly">
</div>
</div>
</div>

View file

@ -456,7 +456,7 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $locat
var session = editor.getSession();
var dirtyText = session.getValue();
$scope.dirtyText = dirtyText;
$scope.startSaveTimer();
$scope.$broadcast('startSaveTimer');
setParagraphMode(session, dirtyText, editor.getCursorPosition());
};
@ -696,7 +696,7 @@ function ParagraphCtrl($scope, $rootScope, $route, $window, $routeParams, $locat
return match[1].trim();
// get default interpreter name if paragraph text doesn't start with '%'
// TODO(mina): dig into the cause what makes interpreterBindings to have no element
} else if ($scope.$parent.interpreterBindings.length !== 0) {
} else if ($scope.$parent.interpreterBindings && $scope.$parent.interpreterBindings.length !== 0) {
return $scope.$parent.interpreterBindings[0].name;
}
return '';

View file

@ -166,7 +166,7 @@ function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location
class: vis.class
};
});
updateData(result, config, paragraph, index);
renderResult($scope.type);
};
@ -716,6 +716,9 @@ function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location
var getSuggestions = function() {
// Get suggested apps
var noteId = $route.current.pathParams.noteId;
if (!noteId) {
return;
}
$http.get(baseUrlSrv.getRestApiBase() + '/helium/suggest/' + noteId + '/' + paragraph.id)
.success(function(data, status, headers, config) {
$scope.suggestion = data.body;