diff --git a/public/javascripts/areas/home/views/home.coffee b/public/javascripts/areas/home/views/home.coffee index 88d6096..7bc2e5e 100644 --- a/public/javascripts/areas/home/views/home.coffee +++ b/public/javascripts/areas/home/views/home.coffee @@ -17,6 +17,7 @@ define [ @products = opt.products @stores = opt.stores @showProductsAndStores() + document.title = "Ateliês - Shopping virtual de artes e afins" showProductsAndStores: -> context = Handlebars.compile @template @$el.html context @@ -24,6 +25,7 @@ define [ @_showProductsView @products searchStores: -> @$('#searchStores').attr('style', 'display:block !important;').show() + document.title = "Ateliês - busca por lojas" closeSearchStore: -> @$('#searchStores').hide('fade') Backbone.history.navigate "", true @@ -36,6 +38,7 @@ define [ @$('#storeSearchTerm').val searchTerm @$('#productsPlaceHolder').empty() @_showStoresView stores + document.title = "Ateliês - busca por lojas: #{searchTerm}" _showStoresView: (stores) -> @storesView = new StoresView stores:stores @$('#storesPlaceHolder').html @storesView.el @@ -49,3 +52,4 @@ define [ $('#productSearchTerm').val searchTerm @$('#storesPlaceHolder').empty() @_showProductsSearchResultView products + document.title = "Ateliês - busca por produtos: #{searchTerm}" diff --git a/public/javascripts/areas/store/views/cart.coffee b/public/javascripts/areas/store/views/cart.coffee index 583f3de..2e16169 100644 --- a/public/javascripts/areas/store/views/cart.coffee +++ b/public/javascripts/areas/store/views/cart.coffee @@ -22,6 +22,7 @@ define [ cartItems = Cart.get(@store.slug).items() @$el.html context cartItems: cartItems, store: @store, hasItems: cartItems.length isnt 0 @renderCartItems() + document.title = "#{@store.name} - Carrinho" super renderCartItems: => items = @cart.items() diff --git a/public/javascripts/areas/store/views/evaluations.coffee b/public/javascripts/areas/store/views/evaluations.coffee index f7c01ee..f240d50 100644 --- a/public/javascripts/areas/store/views/evaluations.coffee +++ b/public/javascripts/areas/store/views/evaluations.coffee @@ -24,6 +24,7 @@ define [ smallStarsPath : "#{staticPath}/images/jrating/small.png" rateMax: 5 isDisabled: on + document.title = "#{@store.name} - Avaliações" createNiceDate: (date) -> date = new Date(date) if typeof date is 'string' date = date.getTime() unless typeof date is 'number' diff --git a/public/javascripts/areas/store/views/product.coffee b/public/javascripts/areas/store/views/product.coffee index 851e0c8..48dbacf 100644 --- a/public/javascripts/areas/store/views/product.coffee +++ b/public/javascripts/areas/store/views/product.coffee @@ -80,6 +80,7 @@ define [ height: '-=50' , 500, -> $('.name,.price', @).hide() + document.title = "#{@store.name} - #{@product.get('name')}" super createNiceDate: (date) -> date = new Date(date) if typeof date is 'string' diff --git a/public/javascripts/areas/store/views/store.coffee b/public/javascripts/areas/store/views/store.coffee index d297926..89fb430 100644 --- a/public/javascripts/areas/store/views/store.coffee +++ b/public/javascripts/areas/store/views/store.coffee @@ -33,8 +33,10 @@ define [ isDisabled: on @productsView = new ProductsView products:@products @$('#productsPlaceHolder').html @productsView.el + document.title = @store.name super showProductsSearchResults: (searchTerm, products) -> $('#productSearchTerm').val searchTerm productsSearchResultsView = new ProductsSearchResultsView products:products @$('#productsPlaceHolder').html productsSearchResultsView.el + document.title = "#{@store.name} - busca por: #{searchTerm}" diff --git a/public/javascripts/areas/store/views/templates/store.html b/public/javascripts/areas/store/views/templates/store.html index 34f50ee..92c4a34 100644 --- a/public/javascripts/areas/store/views/templates/store.html +++ b/public/javascripts/areas/store/views/templates/store.html @@ -6,7 +6,7 @@ {{#if hasEvaluations}}