Commit fc8929230850a382492d6e9086f381ff46f137ba
Exists in
master
and in
11 other branches
fix conflict
Showing
5 changed files
with
136 additions
and
82 deletions
Show diff stats
css/style.css
| ... | ... | @@ -1,82 +0,0 @@ |
| 1 | -/* | |
| 2 | -Error: Invalid CSS after "...ackground: #fff": expected "{", was "; " | |
| 3 | - on line 78 of _proposal_categories.scss | |
| 4 | - from line 25 of style.scss | |
| 5 | - | |
| 6 | -73: font-family: asap_bold; | |
| 7 | -74: font-size: 18pt; | |
| 8 | -75: font-weight: bold; | |
| 9 | -76: text-decoration: none; | |
| 10 | -77: <<<<<<< HEAD | |
| 11 | -78: background: #fff; | |
| 12 | -79: ======= | |
| 13 | -80: >>>>>>> 450d03f922b650755bff80ce172cd13d76d06632 | |
| 14 | -81: } | |
| 15 | -82: | |
| 16 | -83: .proposal-item { | |
| 17 | - | |
| 18 | -Backtrace: | |
| 19 | -_proposal_categories.scss:78 | |
| 20 | -style.scss:25 | |
| 21 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:1165:in `expected' | |
| 22 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:1101:in `expected' | |
| 23 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:1096:in `tok!' | |
| 24 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:641:in `block' | |
| 25 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:711:in `declaration_or_ruleset' | |
| 26 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:661:in `block_child' | |
| 27 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:653:in `block_contents' | |
| 28 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:642:in `block' | |
| 29 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:711:in `declaration_or_ruleset' | |
| 30 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:661:in `block_child' | |
| 31 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:653:in `block_contents' | |
| 32 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:642:in `block' | |
| 33 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:635:in `ruleset' | |
| 34 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:660:in `block_child' | |
| 35 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:653:in `block_contents' | |
| 36 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:117:in `stylesheet' | |
| 37 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/scss/parser.rb:42:in `parse' | |
| 38 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/engine.rb:393:in `_to_tree' | |
| 39 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/engine.rb:299:in `to_tree' | |
| 40 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:323:in `block in visit_import' | |
| 41 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/stack.rb:88:in `block in with_import' | |
| 42 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/stack.rb:115:in `with_frame' | |
| 43 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/stack.rb:88:in `with_import' | |
| 44 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:322:in `visit_import' | |
| 45 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:36:in `visit' | |
| 46 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:158:in `block in visit' | |
| 47 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/stack.rb:79:in `block in with_base' | |
| 48 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/stack.rb:115:in `with_frame' | |
| 49 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/stack.rb:79:in `with_base' | |
| 50 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:158:in `visit' | |
| 51 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:52:in `block in visit_children' | |
| 52 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:52:in `map' | |
| 53 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:52:in `visit_children' | |
| 54 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children' | |
| 55 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:179:in `with_environment' | |
| 56 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:166:in `visit_children' | |
| 57 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:36:in `block in visit' | |
| 58 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:186:in `visit_root' | |
| 59 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:36:in `visit' | |
| 60 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:157:in `visit' | |
| 61 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:8:in `visit' | |
| 62 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/root_node.rb:36:in `css_tree' | |
| 63 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/tree/root_node.rb:29:in `render_with_sourcemap' | |
| 64 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/engine.rb:368:in `_render_with_sourcemap' | |
| 65 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/engine.rb:285:in `render_with_sourcemap' | |
| 66 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/plugin/compiler.rb:490:in `update_stylesheet' | |
| 67 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/plugin/compiler.rb:215:in `block in update_stylesheets' | |
| 68 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/plugin/compiler.rb:209:in `each' | |
| 69 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/plugin/compiler.rb:209:in `update_stylesheets' | |
| 70 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/plugin/compiler.rb:470:in `on_file_changed' | |
| 71 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/lib/sass/plugin/compiler.rb:328:in `block in watch' | |
| 72 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/vendor/listen/lib/listen/listener.rb:252:in `call' | |
| 73 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/vendor/listen/lib/listen/listener.rb:252:in `on_change' | |
| 74 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/vendor/listen/lib/listen/listener.rb:290:in `block in initialize_adapter' | |
| 75 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/vendor/listen/lib/listen/adapters/polling.rb:48:in `call' | |
| 76 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/vendor/listen/lib/listen/adapters/polling.rb:48:in `poll_changed_directories' | |
| 77 | -C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sass-3.4.13/vendor/listen/lib/listen/adapter.rb:299:in `block in start_poller' | |
| 78 | -*/ | |
| 79 | -body:before { | |
| 80 | - white-space: pre; | |
| 81 | - font-family: monospace; | |
| 82 | - content: "Error: Invalid CSS after \"...ackground: #fff\": expected \"{\", was \"; \"\A on line 78 of _proposal_categories.scss\A from line 25 of style.scss\A \A 73: font-family: asap_bold;\A 74: font-size: 18pt;\A 75: font-weight: bold; \A 76: text-decoration: none;\A 77: <<<<<<< HEAD\A 78: background: #fff; \A 79: =======\A 80: >>>>>>> 450d03f922b650755bff80ce172cd13d76d06632\A 81: }\A 82: \A 83: .proposal-item {"; } |
index.html
| ... | ... | @@ -2,10 +2,14 @@ |
| 2 | 2 | <head> |
| 3 | 3 | <meta charset="utf-8" /> |
| 4 | 4 | <title>Dialoga Brasil</title> |
| 5 | +<!-- | |
| 6 | + <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /> | |
| 7 | +--> | |
| 5 | 8 | <link rel="stylesheet" type="text/css" href="style.css" /> |
| 6 | 9 | <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /> |
| 7 | 10 | <script src='js/jquery-2.1.3.min.js'></script> |
| 8 | 11 | <script src='js/jquery-ui-1.11.4.custom/jquery-ui.min.js'></script> |
| 12 | + <script src='js/jquery.cookie.js'></script> | |
| 9 | 13 | <script src='js/handlebars-v3.0.1.js'></script> |
| 10 | 14 | <script src='js/handlebars-helpers.js'></script> |
| 11 | 15 | <script src='js/jquery.dotdotdot.min.js'></script> | ... | ... |
| ... | ... | @@ -0,0 +1,114 @@ |
| 1 | +/*! | |
| 2 | + * jQuery Cookie Plugin v1.4.1 | |
| 3 | + * https://github.com/carhartl/jquery-cookie | |
| 4 | + * | |
| 5 | + * Copyright 2006, 2014 Klaus Hartl | |
| 6 | + * Released under the MIT license | |
| 7 | + */ | |
| 8 | +(function (factory) { | |
| 9 | + if (typeof define === 'function' && define.amd) { | |
| 10 | + // AMD (Register as an anonymous module) | |
| 11 | + define(['jquery'], factory); | |
| 12 | + } else if (typeof exports === 'object') { | |
| 13 | + // Node/CommonJS | |
| 14 | + module.exports = factory(require('jquery')); | |
| 15 | + } else { | |
| 16 | + // Browser globals | |
| 17 | + factory(jQuery); | |
| 18 | + } | |
| 19 | +}(function ($) { | |
| 20 | + | |
| 21 | + var pluses = /\+/g; | |
| 22 | + | |
| 23 | + function encode(s) { | |
| 24 | + return config.raw ? s : encodeURIComponent(s); | |
| 25 | + } | |
| 26 | + | |
| 27 | + function decode(s) { | |
| 28 | + return config.raw ? s : decodeURIComponent(s); | |
| 29 | + } | |
| 30 | + | |
| 31 | + function stringifyCookieValue(value) { | |
| 32 | + return encode(config.json ? JSON.stringify(value) : String(value)); | |
| 33 | + } | |
| 34 | + | |
| 35 | + function parseCookieValue(s) { | |
| 36 | + if (s.indexOf('"') === 0) { | |
| 37 | + // This is a quoted cookie as according to RFC2068, unescape... | |
| 38 | + s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); | |
| 39 | + } | |
| 40 | + | |
| 41 | + try { | |
| 42 | + // Replace server-side written pluses with spaces. | |
| 43 | + // If we can't decode the cookie, ignore it, it's unusable. | |
| 44 | + // If we can't parse the cookie, ignore it, it's unusable. | |
| 45 | + s = decodeURIComponent(s.replace(pluses, ' ')); | |
| 46 | + return config.json ? JSON.parse(s) : s; | |
| 47 | + } catch(e) {} | |
| 48 | + } | |
| 49 | + | |
| 50 | + function read(s, converter) { | |
| 51 | + var value = config.raw ? s : parseCookieValue(s); | |
| 52 | + return $.isFunction(converter) ? converter(value) : value; | |
| 53 | + } | |
| 54 | + | |
| 55 | + var config = $.cookie = function (key, value, options) { | |
| 56 | + | |
| 57 | + // Write | |
| 58 | + | |
| 59 | + if (arguments.length > 1 && !$.isFunction(value)) { | |
| 60 | + options = $.extend({}, config.defaults, options); | |
| 61 | + | |
| 62 | + if (typeof options.expires === 'number') { | |
| 63 | + var days = options.expires, t = options.expires = new Date(); | |
| 64 | + t.setMilliseconds(t.getMilliseconds() + days * 864e+5); | |
| 65 | + } | |
| 66 | + | |
| 67 | + return (document.cookie = [ | |
| 68 | + encode(key), '=', stringifyCookieValue(value), | |
| 69 | + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE | |
| 70 | + options.path ? '; path=' + options.path : '', | |
| 71 | + options.domain ? '; domain=' + options.domain : '', | |
| 72 | + options.secure ? '; secure' : '' | |
| 73 | + ].join('')); | |
| 74 | + } | |
| 75 | + | |
| 76 | + // Read | |
| 77 | + | |
| 78 | + var result = key ? undefined : {}, | |
| 79 | + // To prevent the for loop in the first place assign an empty array | |
| 80 | + // in case there are no cookies at all. Also prevents odd result when | |
| 81 | + // calling $.cookie(). | |
| 82 | + cookies = document.cookie ? document.cookie.split('; ') : [], | |
| 83 | + i = 0, | |
| 84 | + l = cookies.length; | |
| 85 | + | |
| 86 | + for (; i < l; i++) { | |
| 87 | + var parts = cookies[i].split('='), | |
| 88 | + name = decode(parts.shift()), | |
| 89 | + cookie = parts.join('='); | |
| 90 | + | |
| 91 | + if (key === name) { | |
| 92 | + // If second argument (value) is a function it's a converter... | |
| 93 | + result = read(cookie, value); | |
| 94 | + break; | |
| 95 | + } | |
| 96 | + | |
| 97 | + // Prevent storing a cookie that we couldn't decode. | |
| 98 | + if (!key && (cookie = read(cookie)) !== undefined) { | |
| 99 | + result[name] = cookie; | |
| 100 | + } | |
| 101 | + } | |
| 102 | + | |
| 103 | + return result; | |
| 104 | + }; | |
| 105 | + | |
| 106 | + config.defaults = {}; | |
| 107 | + | |
| 108 | + $.removeCookie = function (key, options) { | |
| 109 | + // Must not alter options, thus extending a fresh object... | |
| 110 | + $.cookie(key, '', $.extend({}, options, { expires: -1 })); | |
| 111 | + return !$.cookie(key); | |
| 112 | + }; | |
| 113 | + | |
| 114 | +})); | ... | ... |
js/main.js
| ... | ... | @@ -204,6 +204,16 @@ function loadRandomProposal(topic_id, private_token) { |
| 204 | 204 | }); |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | +jQuery(document).ready(function($) { | |
| 208 | + if($.cookie('_dialoga_session')) { | |
| 209 | + var url = host + '/api/v1/users/me?private_token=' + $.cookie('_dialoga_session'); | |
| 210 | + $.getJSON(url).done(function( data ) { | |
| 211 | + logged_in = true; | |
| 212 | + private_token = $.cookie('_dialoga_session'); | |
| 213 | + }); | |
| 214 | + } | |
| 215 | +}); | |
| 216 | + | |
| 207 | 217 | function loginCallback(loggedIn, token) { |
| 208 | 218 | logged_in = loggedIn; |
| 209 | 219 | $('.login .message').text(''); |
| ... | ... | @@ -213,6 +223,7 @@ function loginCallback(loggedIn, token) { |
| 213 | 223 | loginButton.siblings('.save-article-form').show(); |
| 214 | 224 | loginButton.siblings('.save-article-form .message').show(); |
| 215 | 225 | loginButton.siblings('.login-container').hide(); |
| 226 | + $.cookie('_dialoga_session', private_token); | |
| 216 | 227 | } else { |
| 217 | 228 | loginButton.siblings('.save-article-form').hide(); |
| 218 | 229 | loginButton.siblings('.login-container').show(); |
| ... | ... | @@ -229,6 +240,9 @@ jQuery(document).ready(function($) { |
| 229 | 240 | type: 'post', |
| 230 | 241 | url: host + '/api/v1/login', |
| 231 | 242 | data: $(this).parents('.login').serialize(), |
| 243 | + xhrFields: { | |
| 244 | + //withCredentials: true | |
| 245 | + } | |
| 232 | 246 | }).done(function(data) { |
| 233 | 247 | loginCallback(true, data.private_token); |
| 234 | 248 | }).fail(function(data) { | ... | ... |
sass/proposal_detail/_proposal-detail-base.scss