app -> App

This commit is contained in:
Henry Oswald 2014-07-18 11:35:55 +01:00
parent 57b461e0ff
commit 20cf493328
2 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@ define [
"base" "base"
], (App) -> ], (App) ->
app.controller "openInSlController", ($scope) -> App.controller "openInSlController", ($scope) ->
$scope.openInSlText = "Open in ShareLaTeX" $scope.openInSlText = "Open in ShareLaTeX"
$scope.isDisabled = false $scope.isDisabled = false
@ -16,13 +16,13 @@ define [
ga('send', 'event', 'template-site', 'download-zip', $('.page-header h1').text()) ga('send', 'event', 'template-site', 'download-zip', $('.page-header h1').text())
app.factory "algolia", -> App.factory "algolia", ->
if window?.sharelatex?.algolia?.app_id? if window?.sharelatex?.algolia?.app_id?
client = new AlgoliaSearch(window.sharelatex.algolia?.app_id, window.sharelatex.algolia?.api_key) client = new AlgoliaSearch(window.sharelatex.algolia?.app_id, window.sharelatex.algolia?.api_key)
index = client.initIndex(window.sharelatex.algolia?.indexes?.templates) index = client.initIndex(window.sharelatex.algolia?.indexes?.templates)
return index return index
app.controller "SearchController", ($scope, algolia, _) -> App.controller "SearchController", ($scope, algolia, _) ->
$scope.hits = [] $scope.hits = []
$scope.safeApply = (fn)-> $scope.safeApply = (fn)->

View file

@ -2,7 +2,7 @@ define [
"base" "base"
"libs/algolia-2.5.2" "libs/algolia-2.5.2"
], (App, algolia)-> ], (App, algolia)->
app.factory "Institutions", -> App.factory "Institutions", ->
new AlgoliaSearch(window.algolia.institutions.app_id, window.algolia.institutions.api_key).initIndex("institutions") new AlgoliaSearch(window.algolia.institutions.app_id, window.algolia.institutions.api_key).initIndex("institutions")
App.controller "UserProfileController", ($scope, $modal, $http)-> App.controller "UserProfileController", ($scope, $modal, $http)->