mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-04 22:47:35 +00:00
Merge branch 'master-redesign' of github.com:sharelatex/web-sharelatex into master-redesign
This commit is contained in:
commit
88840232fb
10 changed files with 55 additions and 20 deletions
|
@ -11,7 +11,7 @@ ONE_HOUR_IN_S = 60 * 60
|
|||
ONE_DAY_IN_S = ONE_HOUR_IN_S * 24
|
||||
FOUR_DAYS_IN_S = ONE_DAY_IN_S * 4
|
||||
|
||||
USER_TIMEOUT_IN_S = ONE_HOUR_IN_S
|
||||
USER_TIMEOUT_IN_S = ONE_HOUR_IN_S / 4
|
||||
|
||||
buildProjectSetKey = (project_id)-> return "clients_in_project:#{project_id}"
|
||||
buildUserKey = (project_id, client_id)-> return "connected_user:#{project_id}:#{client_id}"
|
||||
|
|
|
@ -43,17 +43,11 @@ html(itemscope, itemtype='http://schema.org/Product')
|
|||
- if(typeof(suppressFooter) == "undefined")
|
||||
include layout/footer
|
||||
|
||||
|
||||
|
||||
- if (typeof(lookingForScribtex) != "undefined" && lookingForScribtex)
|
||||
.modal.hide#scribtexModal
|
||||
.modal-header
|
||||
h3 Looking for ScribTeX?
|
||||
.modal-body
|
||||
p ScribTeX has moved to <strong>https://scribtex.sharelatex.com</strong>. Please update your bookmarks.
|
||||
p(style="text-align: center") You can find the page you were looking for here:
|
||||
p(style="text-align: center")
|
||||
a(href="https://scribtex.sharelatex.com#{scribtexPath}", style="font-size: 16px") https://scribtex.sharelatex.com#{scribtexPath}
|
||||
.modal-footer
|
||||
button(data-dismiss="modal").btn OK
|
||||
span(ng-controller="ScribtexPopupController")
|
||||
include scribtex-modal
|
||||
|
||||
|
||||
- if(typeof(suppressFooter) == "undefined")
|
||||
|
|
|
@ -117,18 +117,21 @@
|
|||
)
|
||||
li.container-fluid
|
||||
.row
|
||||
.col-md-6
|
||||
.col-md-6(ng-click="changePredicate('name')")
|
||||
input.select-all(
|
||||
select-all,
|
||||
type="checkbox"
|
||||
)
|
||||
span.header Title
|
||||
.col-md-2
|
||||
i.tablesort.fa(ng-class="getSortIconClass('name')")
|
||||
.col-md-2(ng-click="changePredicate('accessLevel')")
|
||||
span.header Owner
|
||||
.col-md-4
|
||||
i.tablesort.fa(ng-class="getSortIconClass('accessLevel')")
|
||||
.col-md-4(ng-click="changePredicate('lastUpdated')")
|
||||
span.header Last Modified
|
||||
i.tablesort.fa(ng-class="getSortIconClass('lastUpdated')")
|
||||
li.project_entry.container-fluid(
|
||||
ng-repeat="project in visibleProjects | orderBy:'lastUpdated':true",
|
||||
ng-repeat="project in visibleProjects | orderBy:predicate:reverse",
|
||||
ng-controller="ProjectListItemController"
|
||||
)
|
||||
.row
|
||||
|
|
8
services/web/app/views/scribtex-modal.jade
Normal file
8
services/web/app/views/scribtex-modal.jade
Normal file
|
@ -0,0 +1,8 @@
|
|||
script(type='text/ng-template', id='scribtexModalTemplate')
|
||||
.modal-header
|
||||
h3 Looking for ScribTeX?
|
||||
.modal-body
|
||||
p ScribTeX has moved to <strong>https://scribtex.sharelatex.com</strong>. Please update your bookmarks.
|
||||
p(style="text-align: center") You can find the page you were looking for here:
|
||||
p(style="text-align: center")
|
||||
a(href="https://scribtex.sharelatex.com#{scribtexPath}", style="font-size: 16px") https://scribtex.sharelatex.com#{scribtexPath}
|
|
@ -21,11 +21,16 @@ define [
|
|||
# Don't store myself
|
||||
continue
|
||||
# Store data in the same format returned by clientTracking.clientUpdated
|
||||
if user.first_name?.length == 0 and user.last_name.length == 0
|
||||
name = user.email
|
||||
else
|
||||
name = "#{user.first_name} #{user.last_name}"
|
||||
|
||||
@$scope.onlineUsers[user.client_id] = {
|
||||
id: user.client_id
|
||||
user_id: user.user_id
|
||||
email: user.email
|
||||
name: "#{user.first_name} #{user.last_name}"
|
||||
name: name
|
||||
doc_id: user.cursorData?.doc_id
|
||||
row: user.cursorData?.row
|
||||
column: user.cursorData?.column
|
||||
|
|
|
@ -5,6 +5,7 @@ define [
|
|||
"main/templates"
|
||||
"main/plans"
|
||||
"main/group-members"
|
||||
"main/scribtex-popup"
|
||||
"directives/asyncForm"
|
||||
"directives/stopPropagation"
|
||||
"directives/focus"
|
||||
|
|
|
@ -57,6 +57,8 @@ define [
|
|||
$scope.allSelected = false
|
||||
$scope.selectedProjects = []
|
||||
$scope.filter = "all"
|
||||
$scope.predicate = "lastUpdated"
|
||||
$scope.reverse = false
|
||||
|
||||
$scope.windowHeight = $window.innerHeight
|
||||
angular.element($window).bind "resize", () ->
|
||||
|
@ -75,8 +77,18 @@ define [
|
|||
project.tags ||= []
|
||||
project.tags.push tag
|
||||
|
||||
$scope.$watch "searchText", (value) ->
|
||||
$scope.updateVisibleProjects()
|
||||
$scope.changePredicate = (newPredicate)->
|
||||
if $scope.predicate == newPredicate
|
||||
$scope.reverse = !$scope.reverse
|
||||
$scope.predicate = newPredicate
|
||||
|
||||
$scope.getSortIconClass = (column)->
|
||||
if column == $scope.predicate and $scope.reverse
|
||||
return "fa-sort-down"
|
||||
else if column == $scope.predicate and !$scope.reverse
|
||||
return "fa-sort-up"
|
||||
else
|
||||
return "fa-sort"
|
||||
|
||||
$scope.clearSearchText = () ->
|
||||
$scope.searchText = ""
|
||||
|
|
9
services/web/public/coffee/main/scribtex-popup.coffee
Normal file
9
services/web/public/coffee/main/scribtex-popup.coffee
Normal file
|
@ -0,0 +1,9 @@
|
|||
define [
|
||||
"base"
|
||||
], (App) ->
|
||||
|
||||
App.controller 'ScribtexPopupController', ($scope, $modal) ->
|
||||
|
||||
$modal.open {
|
||||
templateUrl: "scribtexModalTemplate"
|
||||
}
|
|
@ -148,6 +148,9 @@ ul.project-list {
|
|||
color: white;
|
||||
}
|
||||
}
|
||||
i.tablesort {
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
#institution_auto_complete {
|
||||
|
|
|
@ -89,7 +89,7 @@ describe "ConnectedUsersManager", ->
|
|||
|
||||
it "should add a ttl to the connected user so it stays clean", (done)->
|
||||
@ConnectedUsersManager.markUserAsConnected @project_id, @client_id, @user, (err)=>
|
||||
@rClient.expire.calledWith("connected_user:#{@project_id}:#{@client_id}", 60 * 60).should.equal true
|
||||
@rClient.expire.calledWith("connected_user:#{@project_id}:#{@client_id}", 60 * 15).should.equal true
|
||||
done()
|
||||
|
||||
describe "markUserAsDisconnected", ->
|
||||
|
@ -160,6 +160,6 @@ describe "ConnectedUsersManager", ->
|
|||
|
||||
it "should add the ttl on", (done)->
|
||||
@ConnectedUsersManager.setUserCursorPosition @project_id, @client_id, @cursorData, (err)=>
|
||||
@rClient.expire.calledWith("connected_user:#{@project_id}:#{@client_id}", 60 * 60).should.equal true
|
||||
@rClient.expire.calledWith("connected_user:#{@project_id}:#{@client_id}", 60 * 15).should.equal true
|
||||
done()
|
||||
|
||||
|
|
Loading…
Reference in a new issue