Skip to content

Commit

Permalink
Rewrite docs for noninteractive content input field. Fix a couple of …
Browse files Browse the repository at this point in the history
…small UI bugs.
  • Loading branch information
seanlip committed Nov 18, 2013
1 parent 6bd9d11 commit aba393f
Showing 4 changed files with 8 additions and 13 deletions.
4 changes: 2 additions & 2 deletions core/templates/dev/head/components/simpleEditors.js
Original file line number Diff line number Diff line change
@@ -591,8 +591,8 @@ oppia.directive('filepath', function ($http, $rootScope, $sce, warningsData) {
};

if (!$scope.explorationId) {
console.log('Error: File picker widget called without being given an exploration.');
// TODO(sll): Send an error to the backend.
warningsData.addWarning(
'Error: File picker widget called without being given an exploration.');
return;
}

2 changes: 1 addition & 1 deletion core/templates/dev/head/editor/InteractiveWidgetEditor.js
Original file line number Diff line number Diff line change
@@ -497,7 +497,7 @@ function InteractiveWidgetEditor($scope, $http, $modal, warningsData, exploratio
console.log('Resize event received for widget preview.');
console.log(evt.data);
// Change the height of the included iframe.
var height = parseInt(event.data.widgetHeight, 10) + 2;
var height = parseInt(event.data.widgetHeight, 10) + 20;
var iframe = document.getElementById($scope.previewIframeId);
iframe.height = height + 'px';
}
8 changes: 0 additions & 8 deletions core/templates/dev/head/editor/StateEditor.js
Original file line number Diff line number Diff line change
@@ -114,14 +114,6 @@ function StateEditor($scope, $http, $filter, $sce, $modal, explorationData,
$scope.stateNameMemento = null;
};

// TODO(sll): Replace this with a link to code.google.com documentation.
$scope.defaultTextContent = (
'Click \'Edit\' to enter text here. Text enclosed in dollar signs ' +
'will be displayed as $LaTeX$. To write a non-LaTeXed dollar sign, ' +
'type a single backslash (\'\\\') followed by \'$\'. For more ' +
'information about LaTeX, see ' +
'http://web.ift.uib.no/Teori/KURS/WRK/TeX/symALL.html');

// This should only be non-null when the content editor is open.
$scope.contentMemento = null;

7 changes: 5 additions & 2 deletions core/templates/dev/head/editor/state_editor.html
Original file line number Diff line number Diff line change
@@ -117,8 +117,11 @@ <h3>

<div class="span8 oppia-state-content">
<div ng-if="!contentMemento">
<span ng-if="content[0].value == ''" class="oppia-placeholder">
<[defaultTextContent]>
<span ng-show="content[0].value == ''" class="oppia-placeholder">
This editor supports $LaTeX$.
<a href="https://code.google.com/p/oppia/wiki/NonInteractiveContent" target="_blank">
More information...
</a>
</span>
<span angular-html-bind="content[0].value"></span>
</div>

0 comments on commit aba393f

Please sign in to comment.