CSS guidestyle

This commit is contained in:
augier 2015-11-20 14:26:57 +01:00 committed by Steffen van Bergerem
parent c9f87796cc
commit f1e8c57c26
4 changed files with 11 additions and 11 deletions

View file

@ -225,8 +225,8 @@ app.views.Publisher = Backbone.View.extend({
// creates the location // creates the location
showLocation: function(){ showLocation: function(){
if($("#location").length === 0){ if($("#location").length === 0){
$("#location_container").append("<div id=\"location\"></div>"); this.$(".location-container").append("<div id=\"location\"></div>");
this.wrapperEl.addClass("with_location"); this.wrapperEl.addClass("with-location");
this.view_locator = new app.views.Location(); this.view_locator = new app.views.Location();
} }
}, },
@ -235,7 +235,7 @@ app.views.Publisher = Backbone.View.extend({
destroyLocation: function(){ destroyLocation: function(){
if(this.view_locator){ if(this.view_locator){
this.view_locator.remove(); this.view_locator.remove();
this.wrapperEl.removeClass("with_location"); this.wrapperEl.removeClass("with-location");
delete this.view_locator; delete this.view_locator;
} }
}, },

View file

@ -5,7 +5,7 @@
&.closed { &.closed {
#button_container, #button_container,
#location_container, .location-container,
#hide_publisher, #hide_publisher,
#photodropzone_container, #photodropzone_container,
.counter, .counter,
@ -118,13 +118,13 @@
} }
} }
&:not(.with_location) #location_container { display: none; } &:not(.with-location) .location-container { display: none; }
&.with_location .loader { &.with-location .loader {
height: 20px; height: 20px;
width: 20px; width: 20px;
} }
&.with_location #location_container { &.with-location .location-container {
height: 30px; height: 30px;
margin-bottom: 0; margin-bottom: 0;
border-top: 1px dashed $border-grey; border-top: 1px dashed $border-grey;
@ -230,7 +230,7 @@
display: none; display: none;
} }
} }
&.with_location #publisher-images { &.with-location #publisher-images {
#hide_location { display: inline-block; } #hide_location { display: inline-block; }
#locator { display: none; } #locator { display: none; }
} }
@ -242,7 +242,7 @@
right: 10px; right: 10px;
bottom: -25px; bottom: -25px;
} }
&.with_location .counter { &.with-location .counter {
bottom: -62px; bottom: -62px;
} }
.warning { .warning {

View file

@ -24,7 +24,7 @@
.container-fluid#photodropzone_container .container-fluid#photodropzone_container
%ul#photodropzone %ul#photodropzone
#location_container.form-group{ style: "padding: 4px 6px;"} .location-container.form-group{style: "padding: 4px 6px;"}
= hidden_field :location, :coords = hidden_field :location, :coords
#poll_creator_container #poll_creator_container
-# handlebars template -# handlebars template

View file

@ -430,7 +430,7 @@ describe("app.views.Publisher", function() {
it("Show location", function(){ it("Show location", function(){
// inserts location to the DOM; it is the location's view element // inserts location to the DOM; it is the location's view element
setFixtures('<div id="location_container"></div>'); setFixtures('<div class="location-container"></div>');
// creates a fake Locator // creates a fake Locator
OSM = {}; OSM = {};