mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-21 04:42:04 +00:00
Merge branch 'master-redesign' of https://github.com/sharelatex/web-sharelatex into master-redesign
This commit is contained in:
commit
82914b6fe5
13 changed files with 44 additions and 30 deletions
services/web
app/views/project
public
coffee
stylesheets/app/editor
|
@ -86,6 +86,7 @@ block content
|
|||
window.userSettings = !{JSON.stringify(userSettings).replace(/\//g, '\\/')};
|
||||
window.user = !{JSON.stringify(user).replace(/\//g, '\\/')};
|
||||
window.csrfToken = "!{csrfToken}";
|
||||
window.anonymous = #{anonymous};
|
||||
window.requirejs = {
|
||||
"paths" : {
|
||||
"mathjax": "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
aside.chat(
|
||||
ng-controller="ChatController"
|
||||
ng-controller="ChatController",
|
||||
ng-if="!anonymous"
|
||||
)
|
||||
.messages(
|
||||
infinite-scroll="loadMoreMessages()"
|
||||
|
@ -12,6 +13,12 @@ aside.chat(
|
|||
.loading(ng-show="chat.loading")
|
||||
i.fa.fa-fw.fa-spin.fa-refresh
|
||||
| Loading...
|
||||
.no-messages.text-center.small(ng-show='!chat.loading && chat.messages.length == 0')
|
||||
| No messages
|
||||
.first-message.text-center(ng-show='!chat.loading && chat.messages.length == 0')
|
||||
| Send your first message
|
||||
br
|
||||
i.fa.fa-arrow-down
|
||||
ul.list-unstyled(
|
||||
ng-click="resetUnreadMessages()"
|
||||
)
|
||||
|
|
|
@ -33,7 +33,7 @@ div.full-size(
|
|||
include ./pdf
|
||||
|
||||
.ui-layout-resizer-controls.synctex-controls(
|
||||
ng-show="!!pdf.url && settings.pdfViewer == 'pdfjs' && showControls"
|
||||
ng-show="!!pdf.url && settings.pdfViewer == 'pdfjs'"
|
||||
ng-controller="PdfSynctexController"
|
||||
)
|
||||
a.btn.btn-default.btn-xs(
|
||||
|
|
|
@ -3,13 +3,15 @@ header.toolbar.toolbar-header(ng-cloak, ng-hide="state.loading")
|
|||
href,
|
||||
ng-click="ui.leftMenuShown = true"
|
||||
tooltip="Menu",
|
||||
tooltip-placement="bottom"
|
||||
tooltip-placement="bottom",
|
||||
tooltip-append-to-body="true"
|
||||
)
|
||||
i.fa.fa-fw.fa-bars
|
||||
a(
|
||||
href="/project"
|
||||
tooltip="Back to projects",
|
||||
tooltip-placement="bottom"
|
||||
tooltip-placement="bottom",
|
||||
tooltip-append-to-body="true"
|
||||
)
|
||||
i.fa.fa-fw.fa-level-up
|
||||
|
||||
|
@ -76,7 +78,8 @@ header.toolbar.toolbar-header(ng-cloak, ng-hide="state.loading")
|
|||
tooltip-placement="bottom",
|
||||
ng-class="{ active: ui.chatOpen }",
|
||||
ng-click="toggleChat()",
|
||||
ng-controller="ChatButtonController"
|
||||
ng-controller="ChatButtonController",
|
||||
ng-show="!anonymous"
|
||||
)
|
||||
i.fa.fa-fw.fa-comment(
|
||||
ng-class="{ 'bounce': unreadMessages > 0 }"
|
||||
|
|
|
@ -53,6 +53,7 @@ define [
|
|||
}
|
||||
$scope.user = window.user
|
||||
$scope.settings = window.userSettings
|
||||
$scope.anonymous = window.anonymous
|
||||
|
||||
$scope.chat = {}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ define [
|
|||
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
||||
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
|
||||
processEscapes: true
|
||||
|
||||
skipStartupTypeset: true
|
||||
|
||||
MathJax.Hub.Config(mathjaxConfig);
|
||||
|
||||
|
|
|
@ -72,15 +72,20 @@ define [
|
|||
repositionControls = () ->
|
||||
state = element.layout().readState()
|
||||
if state.east?
|
||||
element.find("> .ui-layout-resizer-controls").css({
|
||||
position: "absolute"
|
||||
right: state.east.size
|
||||
"z-index": 10
|
||||
})
|
||||
controls = element.find("> .ui-layout-resizer-controls")
|
||||
if state.east.initClosed
|
||||
controls.hide()
|
||||
else
|
||||
controls.show()
|
||||
controls.css({
|
||||
position: "absolute"
|
||||
right: state.east.size
|
||||
"z-index": 10
|
||||
})
|
||||
|
||||
resetOpenStates = () ->
|
||||
state = element.layout().readState()
|
||||
if attrs.openEast?
|
||||
if attrs.openEast? and state.east?
|
||||
openEast = $parse(attrs.openEast)
|
||||
openEast.assign(scope, !state.east.initClosed)
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ define [
|
|||
sharejs_doc: null
|
||||
open_doc_id: null
|
||||
opening: true
|
||||
gotoLine: null
|
||||
}
|
||||
|
||||
@$scope.$on "entity:selected", (event, entity) =>
|
||||
|
|
|
@ -33,7 +33,6 @@ define [
|
|||
highlights: "="
|
||||
text: "="
|
||||
readOnly: "="
|
||||
gotoLine: "="
|
||||
annotations: "="
|
||||
navigateHighlights: "="
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ define [], () ->
|
|||
if value?
|
||||
setTimeout () =>
|
||||
@gotoLine(value)
|
||||
, 0
|
||||
, 10 # Hack: Must happen after @gotoStoredPosition
|
||||
|
||||
storeScrollTopPosition: (session) ->
|
||||
if @doc_id?
|
||||
|
|
|
@ -3,9 +3,6 @@ define [
|
|||
], (App) ->
|
||||
App.directive "droppable", () ->
|
||||
return {
|
||||
scope: {
|
||||
onDropCallback: "="
|
||||
}
|
||||
link: (scope, element, attrs) ->
|
||||
scope.$watch attrs.droppable, (droppable) ->
|
||||
if droppable
|
||||
|
@ -13,5 +10,5 @@ define [
|
|||
greedy: true
|
||||
hoverClass: "droppable-hover"
|
||||
accept: attrs.accept
|
||||
drop: scope.onDropCallback
|
||||
drop: scope.$eval(attrs.onDropCallback)
|
||||
}
|
|
@ -223,17 +223,6 @@ define [
|
|||
]
|
||||
|
||||
App.controller "PdfSynctexController", ["$scope", "synctex", "ide", ($scope, synctex, ide) ->
|
||||
$scope.showControls = true
|
||||
$scope.$on "layout:pdf:resize", (event, data) ->
|
||||
if data.east.initClosed
|
||||
$scope.showControls = false
|
||||
else
|
||||
$scope.showControls = true
|
||||
|
||||
setTimeout () ->
|
||||
$scope.$digest()
|
||||
, 0
|
||||
|
||||
@cursorPosition = null
|
||||
ide.$scope.$on "cursor:editor:update", (event, @cursorPosition) =>
|
||||
|
||||
|
|
|
@ -7,6 +7,17 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.no-messages {
|
||||
padding: @line-height-computed / 2;
|
||||
}
|
||||
|
||||
.first-message {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: @line-height-computed / 2;
|
||||
}
|
||||
|
||||
.messages {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -104,6 +115,8 @@
|
|||
padding: @line-height-computed / 4;
|
||||
border-top: 1px solid @toolbar-border-color;
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: none;
|
||||
border-radius: @border-radius-base;
|
||||
border: 1px solid @toolbar-border-color;
|
||||
height: 100%;
|
||||
|
|
Loading…
Reference in a new issue